Skip to content

Commit 0c1dc62

Browse files
committed
Auto merge of #56340 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 22 pull requests Successful merges: - #55391 (bootstrap: clean up a few clippy findings) - #56021 (avoid features_untracked) - #56023 (atomic::Ordering: Get rid of misleading parts of intro) - #56080 (Reduce the amount of bold text at doc.rlo) - #56114 (Enclose type in backticks for "non-exhaustive patterns" error) - #56124 (Fix small doc mistake on std::io::read::read_to_end) - #56127 (Update an outdated comment in mir building) - #56148 (Add rustc-guide as a submodule) - #56149 (Make std::os::unix/linux::fs::MetadataExt::a/m/ctime* documentation clearer) - #56220 (Suggest appropriate place for lifetime when declared after type arguments) - #56223 (Make JSON output from -Zprofile-json valid) - #56236 (Remove unsafe `unsafe` inner function.) - #56255 (Update outdated code comments in StringReader) - #56257 (rustc-guide has moved to rust-lang/) - #56273 (Add missing doc link) - #56289 (Fix small typo in comment of thread::stack_size) - #56294 (Fix a typo in the documentation of std::ffi) - #56312 (Deduplicate literal -> constant lowering) - #56319 (fix futures creating aliasing mutable and shared ref) - #56321 (rustdoc: add bottom margin spacing to nested lists) - #56322 (resolve: Fix false-positives from lint `absolute_paths_not_starting_with_crate`) - #56330 (Clean up span in non-trailing `..` suggestion) Failed merges: r? @ghost
2 parents 147e60c + 3b64f86 commit 0c1dc62

File tree

83 files changed

+418
-316
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+418
-316
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,6 @@
6262
url = https://github.com/rust-lang-nursery/clang.git
6363
branch = rust-release-80-v1
6464

65+
[submodule "src/doc/rustc-guide"]
66+
path = src/doc/rustc-guide
67+
url = https://github.com/rust-lang/rustc-guide.git

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -640,13 +640,13 @@ are:
640640
* **Google!** ([search only in Rust Documentation][gsearchdocs] to find types, traits, etc. quickly)
641641
* Don't be afraid to ask! The Rust community is friendly and helpful.
642642

643-
[rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/about-this-guide.html
643+
[rustc guide]: https://rust-lang.github.io/rustc-guide/about-this-guide.html
644644
[gdfrustc]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/
645645
[gsearchdocs]: https://www.google.com/search?q=site:doc.rust-lang.org+your+query+here
646646
[rif]: http://internals.rust-lang.org
647647
[rr]: https://doc.rust-lang.org/book/README.html
648648
[rustforge]: https://forge.rust-lang.org/
649649
[tlgba]: http://tomlee.co/2014/04/a-more-detailed-tour-of-the-rust-compiler/
650650
[ro]: http://www.rustaceans.org/
651-
[rctd]: https://rust-lang-nursery.github.io/rustc-guide/tests/intro.html
651+
[rctd]: https://rust-lang.github.io/rustc-guide/tests/intro.html
652652
[cheatsheet]: https://buildbot2.rust-lang.org/homu/

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ Also, you may find the [rustdocs for the compiler itself][rustdocs] useful.
233233
[IRC]: https://en.wikipedia.org/wiki/Internet_Relay_Chat
234234
[#rust]: irc://irc.mozilla.org/rust
235235
[#rust-beginners]: irc://irc.mozilla.org/rust-beginners
236-
[rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/about-this-guide.html
236+
[rustc guide]: https://rust-lang.github.io/rustc-guide/about-this-guide.html
237237
[rustdocs]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/
238238

239239
## License

src/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ There is also useful content in the following READMEs, which are gradually being
1212
- https://github.com/rust-lang/rust/tree/master/src/librustc/infer/higher_ranked
1313
- https://github.com/rust-lang/rust/tree/master/src/librustc/infer/lexical_region_resolve
1414

15-
[rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/about-this-guide.html
15+
[rustc guide]: https://rust-lang.github.io/rustc-guide/about-this-guide.html

src/bootstrap/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -777,10 +777,10 @@ impl Build {
777777
fn cflags(&self, target: Interned<String>, which: GitRepo) -> Vec<String> {
778778
// Filter out -O and /O (the optimization flags) that we picked up from
779779
// cc-rs because the build scripts will determine that for themselves.
780-
let mut base: Vec<String> = self.cc[&target].args().iter()
780+
let mut base = self.cc[&target].args().iter()
781781
.map(|s| s.to_string_lossy().into_owned())
782782
.filter(|s| !s.starts_with("-O") && !s.starts_with("/O"))
783-
.collect::<Vec<_>>();
783+
.collect::<Vec<String>>();
784784

785785
// If we're compiling on macOS then we add a few unconditional flags
786786
// indicating that we want libc++ (more filled out than libstdc++) and

src/doc/index.md

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ nav {
2121
#search-but:hover, #search-input:focus {
2222
border-color: #55a9ff;
2323
}
24+
h2 {
25+
font-size: 18px;
26+
}
2427
</style>
2528

2629
Welcome to an overview of the documentation provided by the Rust project.

src/doc/rustc-guide

Submodule rustc-guide added at 3a80495

src/doc/rustc/src/contributing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing to rustc
22

33
We'd love to have your help improving `rustc`! To that end, we've written [a
4-
whole book](https://rust-lang-nursery.github.io/rustc-guide/) on its
4+
whole book](https://rust-lang.github.io/rustc-guide/) on its
55
internals, how it works, and how to get started working on it. To learn
6-
more, you'll want to check that out.
6+
more, you'll want to check that out.

src/libcore/iter/iterator.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ pub trait Iterator {
519519
/// element.
520520
///
521521
/// `map()` transforms one iterator into another, by means of its argument:
522-
/// something that implements `FnMut`. It produces a new iterator which
522+
/// something that implements [`FnMut`]. It produces a new iterator which
523523
/// calls this closure on each element of the original iterator.
524524
///
525525
/// If you are good at thinking in types, you can think of `map()` like this:
@@ -533,6 +533,7 @@ pub trait Iterator {
533533
/// more idiomatic to use [`for`] than `map()`.
534534
///
535535
/// [`for`]: ../../book/ch03-05-control-flow.html#looping-through-a-collection-with-for
536+
/// [`FnMut`]: ../../std/ops/trait.FnMut.html
536537
///
537538
/// # Examples
538539
///

src/libcore/str/lossy.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,15 @@ impl<'a> Iterator for Utf8LossyChunksIter<'a> {
6262
}
6363

6464
const TAG_CONT_U8: u8 = 128;
65-
fn unsafe_get(xs: &[u8], i: usize) -> u8 {
66-
unsafe { *xs.get_unchecked(i) }
67-
}
6865
fn safe_get(xs: &[u8], i: usize) -> u8 {
69-
if i >= xs.len() { 0 } else { unsafe_get(xs, i) }
66+
*xs.get(i).unwrap_or(&0)
7067
}
7168

7269
let mut i = 0;
7370
while i < self.source.len() {
7471
let i_ = i;
7572

76-
let byte = unsafe_get(self.source, i);
73+
let byte = unsafe { *self.source.get_unchecked(i) };
7774
i += 1;
7875

7976
if byte < 128 {

src/libcore/sync/atomic.rs

+9-7
Original file line numberDiff line numberDiff line change
@@ -173,18 +173,20 @@ unsafe impl<T> Sync for AtomicPtr<T> {}
173173

174174
/// Atomic memory orderings
175175
///
176-
/// Memory orderings limit the ways that both the compiler and CPU may reorder
177-
/// instructions around atomic operations. At its most restrictive,
178-
/// "sequentially consistent" atomics allow neither reads nor writes
179-
/// to be moved either before or after the atomic operation; on the other end
180-
/// "relaxed" atomics allow all reorderings.
176+
/// Memory orderings specify the way atomic operations synchronize memory.
177+
/// In its weakest [`Relaxed`][Ordering::Relaxed], only the memory directly touched by the
178+
/// operation is synchronized. On the other hand, a store-load pair of [`SeqCst`][Ordering::SeqCst]
179+
/// operations synchronize other memory while additionally preserving a total order of such
180+
/// operations across all threads.
181181
///
182182
/// Rust's memory orderings are [the same as
183183
/// LLVM's](https://llvm.org/docs/LangRef.html#memory-model-for-concurrent-operations).
184184
///
185185
/// For more information see the [nomicon].
186186
///
187187
/// [nomicon]: ../../../nomicon/atomics.html
188+
/// [Ordering::Relaxed]: #variant.Relaxed
189+
/// [Ordering::SeqCst]: #variant.SeqCst
188190
#[stable(feature = "rust1", since = "1.0.0")]
189191
#[derive(Copy, Clone, Debug)]
190192
#[non_exhaustive]
@@ -234,8 +236,8 @@ pub enum Ordering {
234236
/// For loads it uses [`Acquire`] ordering. For stores it uses the [`Release`] ordering.
235237
///
236238
/// Notice that in the case of `compare_and_swap`, it is possible that the operation ends up
237-
/// not performing any store and hence it has just `Acquire` ordering. However,
238-
/// `AcqRel` will never perform [`Relaxed`] accesses.
239+
/// not performing any store and hence it has just [`Acquire`] ordering. However,
240+
/// [`AcqRel`][`AcquireRelease`] will never perform [`Relaxed`] accesses.
239241
///
240242
/// This ordering is only applicable for operations that combine both loads and stores.
241243
///

src/librustc/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
For more information about how rustc works, see the [rustc guide].
22

3-
[rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/
3+
[rustc guide]: https://rust-lang.github.io/rustc-guide/

src/librustc/dep_graph/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
To learn more about how dependency tracking works in rustc, see the [rustc
22
guide].
33

4-
[rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/query.html
4+
[rustc guide]: https://rust-lang.github.io/rustc-guide/query.html

src/librustc/dep_graph/graph.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ impl DepGraph {
195195
/// - If you need 3+ arguments, use a tuple for the
196196
/// `arg` parameter.
197197
///
198-
/// [rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/incremental-compilation.html
198+
/// [rustc guide]: https://rust-lang.github.io/rustc-guide/incremental-compilation.html
199199
pub fn with_task<'gcx, C, A, R>(&self,
200200
key: DepNode,
201201
cx: C,

src/librustc/hir/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ pub struct WhereEqPredicate {
689689
///
690690
/// For more details, see the [rustc guide].
691691
///
692-
/// [rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/hir.html
692+
/// [rustc guide]: https://rust-lang.github.io/rustc-guide/hir.html
693693
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
694694
pub struct Crate {
695695
pub module: Mod,

src/librustc/infer/canonical/canonicalizer.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//! For an overview of what canonicalization is and how it fits into
1414
//! rustc, check out the [chapter in the rustc guide][c].
1515
//!
16-
//! [c]: https://rust-lang-nursery.github.io/rustc-guide/traits/canonicalization.html
16+
//! [c]: https://rust-lang.github.io/rustc-guide/traits/canonicalization.html
1717
1818
use infer::canonical::{
1919
Canonical, CanonicalTyVarKind, CanonicalVarInfo, CanonicalVarKind, Canonicalized,
@@ -44,7 +44,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
4444
/// To get a good understanding of what is happening here, check
4545
/// out the [chapter in the rustc guide][c].
4646
///
47-
/// [c]: https://rust-lang-nursery.github.io/rustc-guide/traits/canonicalization.html#canonicalizing-the-query
47+
/// [c]: https://rust-lang.github.io/rustc-guide/traits/canonicalization.html#canonicalizing-the-query
4848
pub fn canonicalize_query<V>(
4949
&self,
5050
value: &V,
@@ -92,7 +92,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
9292
/// To get a good understanding of what is happening here, check
9393
/// out the [chapter in the rustc guide][c].
9494
///
95-
/// [c]: https://rust-lang-nursery.github.io/rustc-guide/traits/canonicalization.html#canonicalizing-the-query-result
95+
/// [c]: https://rust-lang.github.io/rustc-guide/traits/canonicalization.html#canonicalizing-the-query-result
9696
pub fn canonicalize_response<V>(&self, value: &V) -> Canonicalized<'gcx, V>
9797
where
9898
V: TypeFoldable<'tcx> + Lift<'gcx>,

src/librustc/infer/canonical/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
//! For a more detailed look at what is happening here, check
3030
//! out the [chapter in the rustc guide][c].
3131
//!
32-
//! [c]: https://rust-lang-nursery.github.io/rustc-guide/traits/canonicalization.html
32+
//! [c]: https://rust-lang.github.io/rustc-guide/traits/canonicalization.html
3333
3434
use infer::{InferCtxt, RegionVariableOrigin, TypeVariableOrigin};
3535
use rustc_data_structures::indexed_vec::IndexVec;

src/librustc/infer/canonical/query_response.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
//! For an overview of what canonicaliation is and how it fits into
1616
//! rustc, check out the [chapter in the rustc guide][c].
1717
//!
18-
//! [c]: https://rust-lang-nursery.github.io/rustc-guide/traits/canonicalization.html
18+
//! [c]: https://rust-lang.github.io/rustc-guide/traits/canonicalization.html
1919
2020
use infer::canonical::substitute::substitute_value;
2121
use infer::canonical::{
@@ -184,7 +184,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
184184
/// To get a good understanding of what is happening here, check
185185
/// out the [chapter in the rustc guide][c].
186186
///
187-
/// [c]: https://rust-lang-nursery.github.io/rustc-guide/traits/canonicalization.html#processing-the-canonicalized-query-result
187+
/// [c]: https://rust-lang.github.io/rustc-guide/traits/canonicalization.html#processing-the-canonicalized-query-result
188188
pub fn instantiate_query_response_and_region_obligations<R>(
189189
&self,
190190
cause: &ObligationCause<'tcx>,

src/librustc/infer/canonical/substitute.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//! For an overview of what canonicalization is and how it fits into
1515
//! rustc, check out the [chapter in the rustc guide][c].
1616
//!
17-
//! [c]: https://rust-lang-nursery.github.io/rustc-guide/traits/canonicalization.html
17+
//! [c]: https://rust-lang.github.io/rustc-guide/traits/canonicalization.html
1818
1919
use infer::canonical::{Canonical, CanonicalVarValues};
2020
use ty::fold::TypeFoldable;

src/librustc/infer/higher_ranked/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
329329
/// For more information about how placeholders and HRTBs work, see
330330
/// the [rustc guide].
331331
///
332-
/// [rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/traits/hrtb.html
332+
/// [rustc guide]: https://rust-lang.github.io/rustc-guide/traits/hrtb.html
333333
pub fn replace_bound_vars_with_placeholders<T>(
334334
&self,
335335
binder: &ty::Binder<T>

src/librustc/infer/lexical_region_resolve/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
> WARNING: This README is obsolete and will be removed soon! For
44
> more info on how the current borrowck works, see the [rustc guide].
55
6-
[rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/mir/borrowck.html
6+
[rustc guide]: https://rust-lang.github.io/rustc-guide/mir/borrowck.html
77

88
## Terminology
99

src/librustc/infer/region_constraints/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
> WARNING: This README is obsolete and will be removed soon! For
44
> more info on how the current borrowck works, see the [rustc guide].
55
6-
[rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/mir/borrowck.html
6+
[rustc guide]: https://rust-lang.github.io/rustc-guide/mir/borrowck.html
77

88
## Terminology
99

@@ -18,7 +18,7 @@ constraints over the course of a function. Finally, at the end of
1818
processing a function, we process and solve the constraints all at
1919
once.
2020

21-
[ti]: https://rust-lang-nursery.github.io/rustc-guide/type-inference.html
21+
[ti]: https://rust-lang.github.io/rustc-guide/type-inference.html
2222

2323
The constraints are always of one of three possible forms:
2424

src/librustc/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
//!
3131
//! For more information about how rustc works, see the [rustc guide].
3232
//!
33-
//! [rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/
33+
//! [rustc guide]: https://rust-lang.github.io/rustc-guide/
3434
//!
3535
//! # Note
3636
//!

src/librustc/middle/region.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//! For more information about how MIR-based region-checking works,
1515
//! see the [rustc guide].
1616
//!
17-
//! [rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/mir/borrowck.html
17+
//! [rustc guide]: https://rust-lang.github.io/rustc-guide/mir/borrowck.html
1818
1919
use ich::{StableHashingContext, NodeIdHashingMode};
2020
use util::nodemap::{FxHashMap, FxHashSet};

src/librustc/mir/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! MIR datatypes and passes. See the [rustc guide] for more info.
1212
//!
13-
//! [rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/mir/index.html
13+
//! [rustc guide]: https://rust-lang.github.io/rustc-guide/mir/index.html
1414
1515
use hir::def::CtorKind;
1616
use hir::def_id::DefId;

src/librustc/traits/coherence.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
//! See rustc guide chapters on [trait-resolution] and [trait-specialization] for more info on how
1212
//! this works.
1313
//!
14-
//! [trait-resolution]: https://rust-lang-nursery.github.io/rustc-guide/traits/resolution.html
15-
//! [trait-specialization]: https://rust-lang-nursery.github.io/rustc-guide/traits/specialization.html
14+
//! [trait-resolution]: https://rust-lang.github.io/rustc-guide/traits/resolution.html
15+
//! [trait-specialization]: https://rust-lang.github.io/rustc-guide/traits/specialization.html
1616
1717
use hir::def_id::{DefId, LOCAL_CRATE};
1818
use syntax_pos::DUMMY_SP;

src/librustc/traits/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! Trait Resolution. See [rustc guide] for more info on how this works.
1212
//!
13-
//! [rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/traits/resolution.html
13+
//! [rustc guide]: https://rust-lang.github.io/rustc-guide/traits/resolution.html
1414
1515
pub use self::SelectionError::*;
1616
pub use self::FulfillmentErrorCode::*;

src/librustc/traits/query/type_op/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub trait TypeOp<'gcx, 'tcx>: Sized + fmt::Debug {
5353
/// first canonicalize the key and then invoke the query on the tcx,
5454
/// which produces the resulting query region constraints.
5555
///
56-
/// [c]: https://rust-lang-nursery.github.io/rustc-guide/traits/canonicalization.html
56+
/// [c]: https://rust-lang.github.io/rustc-guide/traits/canonicalization.html
5757
pub trait QueryTypeOp<'gcx: 'tcx, 'tcx>:
5858
fmt::Debug + Sized + TypeFoldable<'tcx> + Lift<'gcx>
5959
{

src/librustc/traits/select.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! See [rustc guide] for more info on how this works.
1212
//!
13-
//! [rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/traits/resolution.html#selection
13+
//! [rustc guide]: https://rust-lang.github.io/rustc-guide/traits/resolution.html#selection
1414
1515
use self::EvaluationResult::*;
1616
use self::SelectionCandidate::*;
@@ -1173,7 +1173,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
11731173
// candidates. See [rustc guide] for more details.
11741174
//
11751175
// [rustc guide]:
1176-
// https://rust-lang-nursery.github.io/rustc-guide/traits/resolution.html#candidate-assembly
1176+
// https://rust-lang.github.io/rustc-guide/traits/resolution.html#candidate-assembly
11771177

11781178
fn candidate_from_obligation<'o>(
11791179
&mut self,
@@ -2720,7 +2720,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
27202720
// type error. See [rustc guide] for more details.
27212721
//
27222722
// [rustc guide]:
2723-
// https://rust-lang-nursery.github.io/rustc-guide/traits/resolution.html#confirmation
2723+
// https://rust-lang.github.io/rustc-guide/traits/resolution.html#confirmation
27242724

27252725
fn confirm_candidate(
27262726
&mut self,

src/librustc/traits/specialize/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
//! See the [rustc guide] for a bit more detail on how specialization
1818
//! fits together with the rest of the trait machinery.
1919
//!
20-
//! [rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/traits/specialization.html
20+
//! [rustc guide]: https://rust-lang.github.io/rustc-guide/traits/specialization.html
2121
2222
use super::{SelectionContext, FulfillmentContext};
2323
use super::util::impl_trait_ref_and_oblig;

src/librustc/ty/constness.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ impl<'a, 'tcx> TyCtxt<'a, 'tcx, 'tcx> {
6666
}
6767
} else {
6868
// users enabling the `const_fn` feature gate can do what they want
69-
!self.sess.features_untracked().const_fn
69+
!self.features().const_fn
7070
}
7171
}
7272
}

src/librustc/ty/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ pub struct FreeRegionInfo {
876876
/// various **compiler queries** that have been performed. See the
877877
/// [rustc guide] for more details.
878878
///
879-
/// [rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/ty.html
879+
/// [rustc guide]: https://rust-lang.github.io/rustc-guide/ty.html
880880
#[derive(Copy, Clone)]
881881
pub struct TyCtxt<'a, 'gcx: 'tcx, 'tcx: 'a> {
882882
gcx: &'a GlobalCtxt<'gcx>,

src/librustc/ty/sty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ pub type Region<'tcx> = &'tcx RegionKind;
11381138
///
11391139
/// [1]: http://smallcultfollowing.com/babysteps/blog/2013/10/29/intermingled-parameter-lists/
11401140
/// [2]: http://smallcultfollowing.com/babysteps/blog/2013/11/04/intermingled-parameter-lists/
1141-
/// [rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/traits/hrtb.html
1141+
/// [rustc guide]: https://rust-lang.github.io/rustc-guide/traits/hrtb.html
11421142
#[derive(Clone, PartialEq, Eq, Hash, Copy, RustcEncodable, RustcDecodable, PartialOrd, Ord)]
11431143
pub enum RegionKind {
11441144
// Region bound in a type or fn declaration which will be

0 commit comments

Comments
 (0)