Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
c7db40f
Rename expected_types_for_fn_args to expected_inputs_for_expected_out…
eddyb Mar 9, 2017
50aee36
Propagate expected type hints through struct literals.
eddyb Mar 9, 2017
6ba494b
Point to let when modifying field of immutable variable
estebank Mar 11, 2017
38b5b29
Change label to "consider changing this to `mut f`"
estebank Mar 12, 2017
197e529
Initial attempt at implementing optimization fuel and re-enabling str…
ahicks92 Mar 8, 2017
8f36057
Make a comment better.
ahicks92 Mar 9, 2017
c2d14fc
Tests for -Z fuel=foo=n
ahicks92 Mar 10, 2017
3fb94b7
UI test for -Z print-fuel=foo
ahicks92 Mar 10, 2017
9ac628d
Add label to primary span for mutable access of immutable struct error
estebank Mar 13, 2017
460bf55
Cleanup.
jseyfried Mar 6, 2017
68c1cc6
Refactor `Attribute` to use `Path` and `TokenStream` instead of `Meta…
jseyfried Mar 3, 2017
839c286
Liberalize attributes.
jseyfried Mar 8, 2017
85e02bd
Add tests.
jseyfried Mar 8, 2017
b43c744
Add feature toggle for rvalue-static-promotion RFC
tbg Mar 11, 2017
20c0f32
Use `&&` instead of `&`
tbg Mar 12, 2017
f06b049
Improve the documentation for `rvalue_static_promotion`
tbg Mar 12, 2017
9741c9d
add test for nested macro def (#31946)
durka Mar 14, 2017
cc23d17
make shift builtins panic-free with new unchecked_sh* intrinsics
TimNN Mar 14, 2017
ff63866
Change how the `0` flag works in format!
Sawyer47 Mar 3, 2017
8065486
Change how the 0 flag works in format! for floats
Sawyer47 Mar 4, 2017
c11ab21
save-analysis: only index path references once
Mar 8, 2017
310f5bd
save-analysis: index extern blocks
Mar 8, 2017
4cf22cb
rebased
Mar 15, 2017
ce616a7
Improve the `TokenStream` quoter.
jseyfried Mar 14, 2017
9b89274
Fix const not displayed in rustdoc
GuillaumeGomez Mar 16, 2017
8c16c45
Check for conflicts between macros 1.0 exports (`#[macro_export]`, `#…
jseyfried Mar 14, 2017
910532e
Add a test for issue 34571
topecongiro Mar 16, 2017
449219a
isolate llvm 4.0 code path
TimNN Mar 16, 2017
222ca3c
clang-format
TimNN Mar 16, 2017
95bd7f2
add missing global metadata
TimNN Mar 16, 2017
50cede0
documented order of conversion between u32 an ipv4addr
Mar 17, 2017
963d4df
minor wording tweak to slice::{as_ptr, as_mut_ptr}
QuietMisdreavus Mar 17, 2017
ec8ecf4
Fix typo in mutex.rs docs
ScottAbbey Mar 17, 2017
33a5665
Stabilize move_cell feature, closes #39264
aturon Mar 15, 2017
65b7c4e
Stabilize expect_err feature, closes #39041
aturon Mar 15, 2017
d38ea8b
Stabilize ptr_unaligned feature, closes #37955
aturon Mar 15, 2017
9511fe6
Stabilize process_abort feature, closes #37838
aturon Mar 15, 2017
10510ae
Stabilize ptr_eq feature, closes #36497
aturon Mar 15, 2017
37b38a2
Stabilize btree_range, closes #27787
aturon Mar 15, 2017
48890d4
Stabilize ordering_chaining, closes #37053
aturon Mar 15, 2017
a8f4a1b
Stabilize rc_raw feature, closes #37197
aturon Mar 15, 2017
1241a88
Minor fixups to fix tidy errors
alexcrichton Mar 15, 2017
27fcdb8
Specialize Vec::from_elem<u8> to use calloc or memset
mbrubeck Mar 10, 2017
ae630ca
Specialize Vec::from_elem for other integer types
mbrubeck Mar 10, 2017
cb96ade
Fix regression when `include!()`ing a `macro_rules!` containing a `$c…
jseyfried Mar 16, 2017
2976ddb
Fix a spelling error in HashMap documentation, and slightly reword it…
jswalden Mar 18, 2017
8eaac08
Parse 0e+10 as a valid floating-point literal
topecongiro Mar 17, 2017
e16d286
add inline attributes to stage 0 methods
TimNN Mar 18, 2017
a6cb1ef
Rollup merge of #40241 - Sawyer47:fix-39997, r=alexcrichton
Mar 18, 2017
67cc915
Rollup merge of #40346 - jseyfried:path_and_tokenstream_attr, r=nrc
Mar 18, 2017
8e6afbf
Rollup merge of #40348 - nrc:save-extern-fn, r=@eddyb
Mar 18, 2017
74028ba
Rollup merge of #40377 - camlorn:optimization_fuel, r=arielb1
Mar 18, 2017
834e2e8
Rollup merge of #40398 - eddyb:struct-hint, r=nikomatsakis
Mar 18, 2017
f340b0b
Rollup merge of #40409 - mbrubeck:calloc, r=sfackler
Mar 18, 2017
d050aee
Rollup merge of #40441 - tschottdorf:promotable-rfc, r=eddyb
Mar 18, 2017
6a6d6de
Rollup merge of #40445 - estebank:issue-18150, r=jonathandturner
Mar 18, 2017
bed891d
Rollup merge of #40509 - jseyfried:duplicate_check_macro_exports, r=nrc
Mar 18, 2017
7474930
Rollup merge of #40521 - TimNN:panic-free-shift, r=alexcrichton
Mar 18, 2017
ca26c79
Rollup merge of #40523 - durka:patch-38, r=petrochenkov
Mar 18, 2017
663409b
Rollup merge of #40532 - jseyfried:improve_tokenstream_quoter, r=nrc
Mar 18, 2017
c2e6d72
Rollup merge of #40538 - aturon:stab-1.17, r=alexcrichton
Mar 18, 2017
196011c
Rollup merge of #40564 - GuillaumeGomez:rustdoc-const, r=frewsxcv
Mar 18, 2017
3c912fb
Rollup merge of #40581 - TimNN:di-global-40, r=alexcrichton
Mar 18, 2017
76c9d17
Rollup merge of #40583 - jseyfried:fix_include_macro_regression, r=nrc
Mar 18, 2017
664d9a5
Rollup merge of #40588 - topecongiro:add-missing-tests, r=alexcrichton
Mar 18, 2017
d3d2866
Rollup merge of #40589 - topecongiro:floating-point-literal, r=nagisa
Mar 18, 2017
a8b619c
Rollup merge of #40590 - z1mvader:master, r=steveklabnik
Mar 18, 2017
42ead56
Rollup merge of #40603 - QuietMisdreavus:slice-ptr-docs, r=GuillaumeG…
Mar 18, 2017
144c9e6
Rollup merge of #40611 - ScottAbbey:patch-1, r=GuillaumeGomez
Mar 18, 2017
337cbc1
Rollup merge of #40621 - jswalden:dependant-spelling-fix, r=sfackler
Mar 18, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix const not displayed in rustdoc
  • Loading branch information
GuillaumeGomez committed Mar 16, 2017
commit 9b892745ad1da5ce9fc374da10f0f06174f13e48
2 changes: 1 addition & 1 deletion src/librustdoc/clean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ impl<'tcx> Clean<Item> for ty::AssociatedItem {
decl: decl,
abi: sig.abi(),

// trait methods canot (currently, at least) be const
// trait methods cannot (currently, at least) be const
constness: hir::Constness::NotConst,
})
} else {
Expand Down
8 changes: 5 additions & 3 deletions src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ use rustc::middle::privacy::AccessLevels;
use rustc::middle::stability;
use rustc::hir;
use rustc::util::nodemap::{FxHashMap, FxHashSet};
use rustc::session::config::nightly_options::is_nightly_build;
use rustc_data_structures::flock;

use clean::{self, AttributesExt, GetDefId, SelfTy, Mutability};
Expand Down Expand Up @@ -2316,9 +2317,10 @@ fn render_assoc_item(w: &mut fmt::Formatter,
}
};
// FIXME(#24111): remove when `const_fn` is stabilized
let vis_constness = match UnstableFeatures::from_environment() {
UnstableFeatures::Allow => constness,
_ => hir::Constness::NotConst
let vis_constness = if is_nightly_build() {
constness
} else {
hir::Constness::NotConst
};
let prefix = format!("{}{}{:#}fn {}{:#}",
ConstnessSpace(vis_constness),
Expand Down
22 changes: 22 additions & 0 deletions src/test/rustdoc/const.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![crate_type="lib"]

#![feature(const_fn)]

pub struct Foo;

impl Foo {
// @has const/struct.Foo.html '//*[@id="new.v"]//code' 'const unsafe fn new'
pub const unsafe fn new() -> Foo {
Foo
}
}