Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 16 pull requests #55943

Closed
wants to merge 49 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
3a8e0af
Reattach all grandchildren when constructing specialization graph.
qnighy Oct 8, 2018
8d2af4a
Update to new system calls and enviromental variables
jackpot51 Aug 11, 2018
b400005
Remove unused type parameter
jackpot51 Aug 11, 2018
8c277d8
Don't forget to close executable file
jackpot51 Aug 17, 2018
9d42b1b
Interpret shebangs on redox
jD91mZM2 Oct 15, 2018
91c1b7a
Revert liblibc submodule url
jD91mZM2 Oct 18, 2018
51e2a63
Fix tidy checks
jD91mZM2 Oct 18, 2018
52deb6b
Add link to std::mem::size_of to size_of intrinsic documentation
fhartwig Oct 30, 2018
19aa101
Speed up String::from_utf16
ljedrz Oct 31, 2018
7eece47
Add BufWriter::buffer method
fintelia Oct 19, 2018
07d966d
Add some tests
fintelia Oct 27, 2018
40e4144
Suggested edits
fintelia Nov 1, 2018
59a0309
Fix compile errors in test
fintelia Nov 1, 2018
2d368b5
NetBSD: link libstd with librt in addition to libpthread
jakllsch Sep 25, 2018
0c08529
A few tweaks to iterations/collecting
ljedrz Nov 5, 2018
2f7b95d
Change sidebar selector to fix compatibility with docs.rs
cynecx Nov 13, 2018
58a2267
hir: remove an unused hir_vec macro pattern
ljedrz Nov 13, 2018
5ea0e0d
hir: simplify fmt::Debug for hir::Path
ljedrz Nov 13, 2018
3d91929
hir: remove an unused type alias
ljedrz Nov 13, 2018
cf4f5c3
hir: simplify a match expression
ljedrz Nov 13, 2018
4e35cbb
fix various typos in doc comments
euclio Nov 12, 2018
98f61a3
core/benches: Add `char::to_digit()` benchmarks
Turbo87 Nov 13, 2018
04aade8
core/char: Replace condition + `panic!()` with `assert!()`
Turbo87 Nov 13, 2018
17f08fe
core/char: Speed up `to_digit()` for `radix <= 10`
Turbo87 Nov 13, 2018
008e5dc
appveyor: Use VS2017 for all our images
alexcrichton Nov 13, 2018
15e7df8
Remove unneeded newline.
frewsxcv Nov 14, 2018
547ac5e
save-analysis: be even more aggressive about ignorning macro-generate…
nrc Nov 13, 2018
818257e
Use `Mmap` to open the rmeta file.
nnethercote Oct 31, 2018
2544286
Rollup merge of #55211 - fintelia:bufwriter-buffer, r=shepmaster
kennytm Nov 14, 2018
27d0606
Rollup merge of #55507 - fhartwig:size_of_intrinsic_docs, r=frewsxcv
kennytm Nov 14, 2018
64a5172
core/char: Drop `radix == 10` special case
Turbo87 Nov 14, 2018
7843e27
core/char: Add comment to `to_digit()`
Turbo87 Nov 14, 2018
7982beb
Rollup merge of #55530 - ljedrz:speed_up_String_from_utf16, r=SimonSapin
kennytm Nov 14, 2018
f851605
submodules: update clippy from d8b42690 to 7e0ddef4
matthiaskrgr Nov 14, 2018
055e7b7
add test for issue #55587
euclio Nov 14, 2018
e2ef0f7
add test for issue #54348
euclio Nov 14, 2018
3d48823
Rollup merge of #55827 - ljedrz:various_stashed, r=alexcrichton
kennytm Nov 14, 2018
24b3688
Rollup merge of #55901 - euclio:speling, r=petrochenkov
kennytm Nov 14, 2018
e678f54
Rollup merge of #55926 - cynecx:fix-rustdoc-mobile-css, r=GuillaumeGomez
kennytm Nov 14, 2018
a24e025
Rollup merge of #55930 - ljedrz:hir_bonuses, r=cramertj
kennytm Nov 14, 2018
f2710f9
Rollup merge of #55936 - nrc:save-rename, r=eddyb
kennytm Nov 14, 2018
e35ece4
Rollup merge of #55935 - alexcrichton:vs2017, r=Mark-Simulacrum
kennytm Nov 14, 2018
fa5dcc8
Rollup merge of #55556 - nnethercote:MmapMeta, r=eddyb
kennytm Nov 14, 2018
f7878db
Rollup merge of #55948 - matthiaskrgr:clippy, r=oli-obk
kennytm Nov 14, 2018
3ab5189
Rollup merge of #55182 - jD91mZM2:rebased, r=alexcrichton
kennytm Nov 14, 2018
6e91bac
Rollup merge of #55622 - jakllsch:netbsd-librt, r=alexcrichton
kennytm Nov 14, 2018
1545878
Rollup merge of #54906 - qnighy:fix-issue-50452, r=nikomatsakis
kennytm Nov 15, 2018
6151db4
Rollup merge of #55932 - Turbo87:to_digit, r=alexcrichton
kennytm Nov 15, 2018
cdfa41e
Rollup merge of #55956 - euclio:issue-55587, r=estebank
kennytm Nov 15, 2018
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
6 changes: 4 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
environment:
SCCACHE_DIGEST: f808afabb4a4eb1d7112bcb3fa6be03b61e93412890c88e177c667eb37f46353d7ec294e559b16f9f4b5e894f2185fe7670a0df15fd064889ecbd80f0c34166c
# This is required for at least an AArch64 compiler in one image, and is
# otherwise recommended by AppVeyor currently for seeing if it has any
# affect on our job times.
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 Preview

# By default schannel checks revocation of certificates unlike some other SSL
# backends, but we've historically had problems on CI where a revocation
Expand Down Expand Up @@ -82,7 +85,6 @@ environment:
DIST_REQUIRE_ALL_TOOLS: 1
DEPLOY: 1
CI_JOB_NAME: dist-x86_64-msvc
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 Preview
- RUST_CONFIGURE_ARGS: >
--build=i686-pc-windows-msvc
--target=i586-pc-windows-msvc
Expand Down
2 changes: 2 additions & 0 deletions src/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2278,12 +2278,14 @@ version = "0.0.0"
dependencies = [
"flate2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
"memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"proc_macro 0.0.0",
"rustc 0.0.0",
"rustc_data_structures 0.0.0",
"rustc_errors 0.0.0",
"rustc_target 0.0.0",
"serialize 0.0.0",
"stable_deref_trait 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntax 0.0.0",
"syntax_ext 0.0.0",
"syntax_pos 0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/collections/btree/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct LeafNode<K, V> {

/// This node's index into the parent node's `edges` array.
/// `*node.parent.edges[node.parent_idx]` should be the same thing as `node`.
/// This is only guaranteed to be initialized when `parent` is nonnull.
/// This is only guaranteed to be initialized when `parent` is non-null.
parent_idx: MaybeUninit<u16>,

/// The number of keys and values this node stores.
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/raw_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ use boxed::Box;
/// This enables you to use capacity growing logic catch the overflows in your length
/// that might occur with zero-sized types.
///
/// However this means that you need to be careful when roundtripping this type
/// However this means that you need to be careful when round-tripping this type
/// with a `Box<[T]>`: `cap()` won't yield the len. However `with_capacity`,
/// `shrink_to_fit`, and `from_box` will actually set RawVec's private capacity
/// field. This allows zero-sized types to not be special-cased by consumers of
Expand Down
10 changes: 9 additions & 1 deletion src/liballoc/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,15 @@ impl String {
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
pub fn from_utf16(v: &[u16]) -> Result<String, FromUtf16Error> {
decode_utf16(v.iter().cloned()).collect::<Result<_, _>>().map_err(|_| FromUtf16Error(()))
let mut ret = String::with_capacity(v.len());
for c in decode_utf16(v.iter().cloned()) {
if let Ok(c) = c {
ret.push(c);
} else {
return Err(FromUtf16Error(()));
}
}
Ok(ret)
}

/// Decode a UTF-16 encoded slice `v` into a `String`, replacing
Expand Down
42 changes: 42 additions & 0 deletions src/libcore/benches/char/methods.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Copyright 2017 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.

use test::Bencher;

const CHARS: [char; 9] = ['0', 'x', '2', '5', 'A', 'f', '7', '8', '9'];
const RADIX: [u32; 5] = [2, 8, 10, 16, 32];

#[bench]
fn bench_to_digit_radix_2(b: &mut Bencher) {
b.iter(|| CHARS.iter().cycle().take(10_000).map(|c| c.to_digit(2)).min())
}

#[bench]
fn bench_to_digit_radix_10(b: &mut Bencher) {
b.iter(|| CHARS.iter().cycle().take(10_000).map(|c| c.to_digit(10)).min())
}

#[bench]
fn bench_to_digit_radix_16(b: &mut Bencher) {
b.iter(|| CHARS.iter().cycle().take(10_000).map(|c| c.to_digit(16)).min())
}

#[bench]
fn bench_to_digit_radix_36(b: &mut Bencher) {
b.iter(|| CHARS.iter().cycle().take(10_000).map(|c| c.to_digit(36)).min())
}

#[bench]
fn bench_to_digit_radix_var(b: &mut Bencher) {
b.iter(|| CHARS.iter().cycle()
.zip(RADIX.iter().cycle())
.take(10_000)
.map(|(c, radix)| c.to_digit(*radix)).min())
}
11 changes: 11 additions & 0 deletions src/libcore/benches/char/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 2017 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.

mod methods;
1 change: 1 addition & 0 deletions src/libcore/benches/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ extern crate core;
extern crate test;

mod any;
mod char;
mod hash;
mod iter;
mod num;
Expand Down
25 changes: 17 additions & 8 deletions src/libcore/char/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,24 @@ impl char {
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
pub fn to_digit(self, radix: u32) -> Option<u32> {
if radix > 36 {
panic!("to_digit: radix is too high (maximum 36)");
}
let val = match self {
'0' ..= '9' => self as u32 - '0' as u32,
'a' ..= 'z' => self as u32 - 'a' as u32 + 10,
'A' ..= 'Z' => self as u32 - 'A' as u32 + 10,
_ => return None,
assert!(radix <= 36, "to_digit: radix is too high (maximum 36)");

// the code is split up here to improve execution speed for cases where
// the `radix` is constant and 10 or smaller
let val = if radix <= 10 {
match self {
'0' ..= '9' => self as u32 - '0' as u32,
_ => return None,
}
} else {
match self {
'0'..='9' => self as u32 - '0' as u32,
'a'..='z' => self as u32 - 'a' as u32 + 10,
'A'..='Z' => self as u32 - 'A' as u32 + 10,
_ => return None,
}
};

if val < radix { Some(val) }
else { None }
}
Expand Down
3 changes: 3 additions & 0 deletions src/libcore/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,9 @@ extern "rust-intrinsic" {
///
/// More specifically, this is the offset in bytes between successive
/// items of the same type, including alignment padding.
///
/// The stabilized version of this intrinsic is
/// [`std::mem::size_of`](../../std/mem/fn.size_of.html).
pub fn size_of<T>() -> usize;

/// Moves a value to an uninitialized memory location.
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/num/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ impl f32 {
/// signaling NaNs on MIPS are quiet NaNs on x86, and vice-versa.
///
/// Rather than trying to preserve signaling-ness cross-platform, this
/// implementation favours preserving the exact bits. This means that
/// implementation favors preserving the exact bits. This means that
/// any payloads encoded in NaNs will be preserved even if the result of
/// this method is sent over the network from an x86 machine to a MIPS one.
///
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/task/wake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl Drop for Waker {
/// is ready to be run.
///
/// This is similar to the `Waker` type, but cannot be sent across threads.
/// Task executors can use this type to implement more optimized singlethreaded wakeup
/// Task executors can use this type to implement more optimized single-threaded wakeup
/// behavior.
#[repr(transparent)]
#[derive(Clone)]
Expand Down
12 changes: 6 additions & 6 deletions src/libproc_macro/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ impl TokenTree {
}
}

/// Prints token treee in a form convenient for debugging.
/// Prints token tree in a form convenient for debugging.
#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
impl fmt::Debug for TokenTree {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
Expand Down Expand Up @@ -730,7 +730,7 @@ impl fmt::Debug for Group {

/// An `Punct` is an single punctuation character like `+`, `-` or `#`.
///
/// Multicharacter operators like `+=` are represented as two instances of `Punct` with different
/// Multi-character operators like `+=` are represented as two instances of `Punct` with different
/// forms of `Spacing` returned.
#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
#[derive(Clone)]
Expand Down Expand Up @@ -788,7 +788,7 @@ impl Punct {

/// Returns the spacing of this punctuation character, indicating whether it's immediately
/// followed by another `Punct` in the token stream, so they can potentially be combined into
/// a multicharacter operator (`Joint`), or it's followed by some other token or whitespace
/// a multi-character operator (`Joint`), or it's followed by some other token or whitespace
/// (`Alone`) so the operator has certainly ended.
#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
pub fn spacing(&self) -> Spacing {
Expand Down Expand Up @@ -947,7 +947,7 @@ macro_rules! suffixed_int_literals {
/// This function will create an integer like `1u32` where the integer
/// value specified is the first part of the token and the integral is
/// also suffixed at the end.
/// Literals created from negative numbers may not survive rountrips through
/// Literals created from negative numbers may not survive round-trips through
/// `TokenStream` or strings and may be broken into two tokens (`-` and positive literal).
///
/// Literals created through this method have the `Span::call_site()`
Expand Down Expand Up @@ -1047,7 +1047,7 @@ impl Literal {

/// Creates a new suffixed floating-point literal.
///
/// This consturctor will create a literal like `1.0f32` where the value
/// This constructor will create a literal like `1.0f32` where the value
/// specified is the preceding part of the token and `f32` is the suffix of
/// the token. This token will always be inferred to be an `f32` in the
/// compiler.
Expand Down Expand Up @@ -1096,7 +1096,7 @@ impl Literal {

/// Creates a new suffixed floating-point literal.
///
/// This consturctor will create a literal like `1.0f64` where the value
/// This constructor will create a literal like `1.0f64` where the value
/// specified is the preceding part of the token and `f64` is the suffix of
/// the token. This token will always be inferred to be an `f64` in the
/// compiler.
Expand Down
3 changes: 1 addition & 2 deletions src/librustc/cfg/graphviz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ impl<'a> dot::GraphWalk<'a> for &'a cfg::CFG {
type Node = Node<'a>;
type Edge = Edge<'a>;
fn nodes(&'a self) -> dot::Nodes<'a, Node<'a>> {
let mut v = Vec::new();
self.graph.each_node(|i, nd| { v.push((i, nd)); true });
let v: Vec<_> = self.graph.enumerated_nodes().collect();
v.into()
}
fn edges(&'a self) -> dot::Edges<'a, Edge<'a>> {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/dep_graph/cgu_reuse_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// except according to those terms.

//! Some facilities for tracking how codegen-units are reused during incremental
//! compilition. This is used for incremental compiliation tests and debug
//! compilation. This is used for incremental compilation tests and debug
//! output.

use session::Session;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/hir/def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub enum NonMacroAttrKind {
Tool,
/// Single-segment custom attribute registered by a derive macro (`#[serde(default)]`).
DeriveHelper,
/// Single-segment custom attriubte registered by a legacy plugin (`register_attribute`).
/// Single-segment custom attribute registered by a legacy plugin (`register_attribute`).
LegacyPluginHelper,
/// Single-segment custom attribute not registered in any way (`#[my_attr]`).
Custom,
Expand Down
3 changes: 1 addition & 2 deletions src/librustc/hir/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1062,8 +1062,7 @@ impl<'a> LoweringContext<'a> {
attrs
.iter()
.map(|a| self.lower_attr(a))
.collect::<Vec<_>>()
.into()
.collect()
}

fn lower_attr(&mut self, attr: &Attribute) -> Attribute {
Expand Down
11 changes: 4 additions & 7 deletions src/librustc/hir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use syntax_pos::{Span, DUMMY_SP, symbol::InternedString};
use syntax::source_map::{self, Spanned};
use rustc_target::spec::abi::Abi;
use syntax::ast::{self, CrateSugar, Ident, Name, NodeId, DUMMY_NODE_ID, AsmDialect};
use syntax::ast::{Attribute, Lit, StrStyle, FloatTy, IntTy, UintTy, MetaItem};
use syntax::ast::{Attribute, Lit, StrStyle, FloatTy, IntTy, UintTy};
use syntax::attr::InlineAttr;
use syntax::ext::hygiene::SyntaxContext;
use syntax::ptr::P;
Expand Down Expand Up @@ -58,7 +58,6 @@ macro_rules! hir_vec {
($($x:expr),*) => (
$crate::hir::HirVec::from(vec![$($x),*])
);
($($x:expr,)*) => (hir_vec![$($x),*])
}

pub mod check_attr;
Expand Down Expand Up @@ -331,7 +330,7 @@ impl Path {

impl fmt::Debug for Path {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "path({})", print::to_string(print::NO_ANN, |s| s.print_path(self, false)))
write!(f, "path({})", self)
}
}

Expand Down Expand Up @@ -698,8 +697,6 @@ pub struct WhereEqPredicate {
pub rhs_ty: P<Ty>,
}

pub type CrateConfig = HirVec<P<MetaItem>>;

/// The top-level data structure that stores the entire contents of
/// the crate currently being compiled.
///
Expand Down Expand Up @@ -1196,8 +1193,8 @@ impl StmtKind {

pub fn id(&self) -> NodeId {
match *self {
StmtKind::Decl(_, id) => id,
StmtKind::Expr(_, id) => id,
StmtKind::Decl(_, id) |
StmtKind::Expr(_, id) |
StmtKind::Semi(_, id) => id,
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/infer/canonical/canonicalizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

//! This module contains the "canonicalizer" itself.
//!
//! For an overview of what canonicaliation is and how it fits into
//! For an overview of what canonicalization is and how it fits into
//! rustc, check out the [chapter in the rustc guide][c].
//!
//! [c]: https://rust-lang-nursery.github.io/rustc-guide/traits/canonicalization.html
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/infer/canonical/query_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
}

/// Given two sets of values for the same set of canonical variables, unify them.
/// The second set is produced lazilly by supplying indices from the first set.
/// The second set is produced lazily by supplying indices from the first set.
fn unify_canonical_vars(
&self,
cause: &ObligationCause<'tcx>,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/infer/canonical/substitute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//! This module contains code to substitute new values into a
//! `Canonical<'tcx, T>`.
//!
//! For an overview of what canonicaliation is and how it fits into
//! For an overview of what canonicalization is and how it fits into
//! rustc, check out the [chapter in the rustc guide][c].
//!
//! [c]: https://rust-lang-nursery.github.io/rustc-guide/traits/canonicalization.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use util::common::ErrorReported;
use infer::lexical_region_resolve::RegionResolutionError::SubSupConflict;

impl<'a, 'gcx, 'tcx> NiceRegionError<'a, 'gcx, 'tcx> {
/// Print the error message for lifetime errors when binding excapes a closure.
/// Print the error message for lifetime errors when binding escapes a closure.
///
/// Consider a case where we have
///
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/infer/higher_ranked/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
///
/// This routine is only intended to be used when the leak-check has
/// passed; currently, it's used in the trait matching code to create
/// a set of nested obligations frmo an impl that matches against
/// a set of nested obligations from an impl that matches against
/// something higher-ranked. More details can be found in
/// `librustc/middle/traits/README.md`.
///
Expand Down
6 changes: 3 additions & 3 deletions src/librustc/infer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1160,10 +1160,10 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
}

/// Takes ownership of the list of variable regions. This implies
/// that all the region constriants have already been taken, and
/// that all the region constraints have already been taken, and
/// hence that `resolve_regions_and_report_errors` can never be
/// called. This is used only during NLL processing to "hand off" ownership
/// of the set of region vairables into the NLL region context.
/// of the set of region variables into the NLL region context.
pub fn take_region_var_origins(&self) -> VarInfos {
let (var_infos, data) = self.region_constraints
.borrow_mut()
Expand Down Expand Up @@ -1478,7 +1478,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
}

/// Clears the selection, evaluation, and projection caches. This is useful when
/// repeatedly attemping to select an Obligation while changing only
/// repeatedly attempting to select an Obligation while changing only
/// its ParamEnv, since FulfillmentContext doesn't use 'probe'
pub fn clear_caches(&self) {
self.selection_cache.clear();
Expand Down
Loading