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 28 pull requests #55320

Closed
wants to merge 82 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
047aac5
Flesh out struct keyword docs
iirelu Sep 3, 2018
1142bbd
Add docs for `as` keyword
iirelu Sep 3, 2018
c1bd8a9
Add keyword docs on const
iirelu Sep 3, 2018
6cbcfa2
Fix a few small things, re-word others
iirelu Sep 3, 2018
f8d6261
Add docs for `crate` keyword
iirelu Sep 5, 2018
f15a1ec
Add keyword docs on `enum`
iirelu Sep 6, 2018
f91ad44
Add docs on `extern` keyword
iirelu Sep 9, 2018
a5c4a38
Expand fn keyword docs
iirelu Sep 9, 2018
f7a6638
Document `for` keyword
iirelu Sep 10, 2018
5d05ae7
Document `if` keyword.
iirelu Sep 12, 2018
5393b27
Incorporate keyword doc PR critique
iirelu Sep 14, 2018
738e58d
Document impl keyword
iirelu Sep 19, 2018
165690b
Rework `let` keyword docs
iirelu Sep 19, 2018
76a353b
Add keyword docs for `loop`.
iirelu Sep 24, 2018
50f631c
Removed dead links to unwritten keyword docs
iirelu Sep 26, 2018
577dbc8
Incorporate criticisms into keyword docs
iirelu Sep 26, 2018
619dfeb
Remove the last broken link.
iirelu Sep 26, 2018
63c471e
rustc: Tweak filenames encoded into metadata
alexcrichton Sep 27, 2018
e961d39
Add line numbers option to rustdoc
GuillaumeGomez Oct 8, 2018
c514b62
update tcp stream documentation
Oct 10, 2018
c77a0cf
Accept `Option<Box<$t:ty>>` in macro argument
estebank Oct 10, 2018
4530b8c
Small changes to fix documentation auto compile issues
Oct 11, 2018
f8550a4
Add doc for impl From for Waker
phungleson Aug 20, 2018
a70ef6a
Seems like we don't have to refer the file anymore.
phungleson Oct 16, 2018
475be10
in which unused-parens suggestions heed what the user actually wrote
zackmdavis Oct 17, 2018
655f9d8
Move cg_llvm::back::linker to cg_utils
bjorn3 Oct 20, 2018
9378705
submodules: update clippy from 5afdf8b7 to b1d03437
matthiaskrgr Oct 21, 2018
0f6e274
Clarified code example
peterjoel Oct 21, 2018
9f70096
Fix a typo in the documentation of RangeInclusive
meithecatte Oct 21, 2018
b0d3d3b
only issue "variant of the expected type" suggestion for enums
zackmdavis Oct 21, 2018
c675111
Correct trailing ellipsis in name_from_pat
varkor Oct 21, 2018
412ad9b
Allow extern statics with an extern type
mjbshaw Oct 22, 2018
9f0a352
Turn ICE for dangling pointers into error
oli-obk Oct 22, 2018
5b84550
Keep an obligation for both sized and unsized types
mjbshaw Oct 22, 2018
0ba1262
Reproduce the underlying issue
oli-obk Oct 22, 2018
80a6b73
Unimplement ExactSizeIterator
sinkuu Oct 22, 2018
b5336c0
Add a cheap mode for `compute_missing_ctors`.
nnethercote Oct 17, 2018
e1e52eb
Suggest appropriate syntax on missing lifetime specifier in return type
estebank Oct 18, 2018
d0bd69a
review comments
estebank Oct 18, 2018
dd91c8f
[review comments] modify test and clean up code
oli-obk Oct 19, 2018
4f2624c
Fix Rustdoc ICE when checking blanket impls
Aaron1011 Oct 22, 2018
fda3326
Remove redundant clone
sinkuu Oct 23, 2018
2d960a5
Update dangling-alloc-id-ice-2.rs
oli-obk Oct 23, 2018
8d6ee8f
Do some copy editing on the release notes
carols10cents Oct 23, 2018
4972bea
fix typos in various places
matthiaskrgr Oct 22, 2018
3d9231c
Update stdsimd submodule
kazcw Oct 23, 2018
320ec81
Hopefully fix compile error
iirelu Oct 23, 2018
3539132
Update comment based on suggestion.
phungleson Oct 23, 2018
f2443a9
Set RUST_BACKTRACE=0 for rustdoc-ui/failed-doctest-output.rs
cuviper Oct 23, 2018
398a264
Update compiler-builtins submodule
alexcrichton Oct 24, 2018
be2075c
This is a regression test for #54478.
pnkfelix Oct 24, 2018
f5bc109
Rollup merge of #53507 - phungleson:fix-impl-from-for-waker, r=cramertj
kennytm Oct 24, 2018
28bde7f
Rollup merge of #54626 - alexcrichton:dwarf-generics, r=michaelwoerister
kennytm Oct 24, 2018
60c3626
Rollup merge of #54965 - chathaway-codes:update-tcp-stream-docs, r=Gu…
kennytm Oct 24, 2018
f3858f8
Rollup merge of #54977 - estebank:macro-arg-parse, r=pnkfelix
kennytm Oct 24, 2018
6ffbde2
Rollup merge of #55138 - zackmdavis:the_paren_trap, r=pnkfelix
kennytm Oct 24, 2018
f2d335b
Rollup merge of #55167 - nnethercote:is_missing_ctors_empty, r=varkor
kennytm Oct 24, 2018
942a162
Rollup merge of #55173 - estebank:suggest-static, r=oli-obk
kennytm Oct 24, 2018
848c2b7
Rollup merge of #55225 - bjorn3:rustc_link, r=cramertj
kennytm Oct 24, 2018
2eff59f
Rollup merge of #55245 - matthiaskrgr:clippy, r=nikomatsakis
kennytm Oct 24, 2018
7f06f15
Rollup merge of #55247 - peterjoel:peterjoel-prim-char-doc-example, r…
kennytm Oct 24, 2018
10e99ff
Rollup merge of #55251 - NieDzejkob:master, r=TimNN
kennytm Oct 24, 2018
c562357
Rollup merge of #55253 - zackmdavis:some_suggestion, r=pnkfelix
kennytm Oct 24, 2018
5b22503
Rollup merge of #55254 - rust-lang:clean-two-dots, r=GuillaumeGomez
kennytm Oct 24, 2018
3e6d322
Rollup merge of #55257 - mjbshaw:static, r=oli-obk
kennytm Oct 24, 2018
c8ead34
Rollup merge of #55258 - Aaron1011:fix/rustdoc-blanket, r=GuillaumeGomez
kennytm Oct 24, 2018
c2463af
Typo
oli-obk Oct 24, 2018
0b82e03
Documents `From` implementations for `Stdio`
octronics Oct 19, 2018
538f65e
Fix doc for new copysign functions
raphlinus Oct 24, 2018
aa85e3e
Rollup merge of #55269 - matthiaskrgr:typos_oct, r=zackmdavis
kennytm Oct 24, 2018
b2071e7
Rollup merge of #55271 - sinkuu:traversal_iter, r=matthewjasper
kennytm Oct 24, 2018
71b94aa
Rollup merge of #55282 - sinkuu:redundant_clone, r=estebank
kennytm Oct 24, 2018
a7e4adf
Rollup merge of #55285 - integer32llc:release-notes-improvements, r=A…
kennytm Oct 24, 2018
163ffa0
Rollup merge of #55291 - kazcw:master, r=nikomatsakis
kennytm Oct 24, 2018
4e3cb07
Rollup merge of #55303 - alexcrichton:update-libm, r=kennytm
kennytm Oct 24, 2018
2fe4308
Rollup merge of #53931 - iirelu:keyword-docs, r=steveklabnik
kennytm Oct 25, 2018
5221790
Rollup merge of #55200 - octronics:gh51430, r=kennytm
kennytm Oct 25, 2018
3b2ea2b
Rollup merge of #55296 - cuviper:rustdoc-ui-backtrace, r=nikomatsakis
kennytm Oct 25, 2018
d307d8a
Rollup merge of #55306 - pnkfelix:issue-54478-regression-test-jemallo…
kennytm Oct 25, 2018
8419761
Rollup merge of #55328 - raphlinus:copysign_typo, r=joshtriplett
kennytm Oct 25, 2018
7d1165c
Rollup merge of #54921 - GuillaumeGomez:line-numbers, r=QuietMisdreavus
kennytm Oct 25, 2018
bff4637
Rollup merge of #55262 - oli-obk:dangling_alloc_id_ice, r=RalfJung
kennytm Oct 25, 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
88 changes: 44 additions & 44 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,34 @@ Version 1.30.0 (2018-10-25)
Language
--------
- [Procedural macros are now available.][52081] These kinds of macros allow for
more powerful code generation, there is a [new chapter available][proc-macros]
in Rust Programming Language book that goes further in depth.
more powerful code generation. There is a [new chapter available][proc-macros]
in the Rust Programming Language book that goes further in depth.
- [You can now use keywords as identifiers using the raw identifiers
syntax (`r#`).][53236] e.g. `let r#for = true;`
syntax (`r#`),][53236] e.g. `let r#for = true;`
- [Using anonymous parameters in traits is now deprecated with a warning and
will be a hard error in the 2018 edition.][53272]
- [You can now use `crate` in paths.][54404] This allows you to refer to the
crate root in the path. e.g. `use crate::foo;` refers to `foo` in `src/lib.rs`.
- [Using a external crate now no longer requires being prefixed with `::`.][54404]
e.g. previously using a external crate in a module without a use statement
required `let json = ::serde_json::from_str(foo);` can now be written
crate root in the path, e.g. `use crate::foo;` refers to `foo` in `src/lib.rs`.
- [Using a external crate no longer requires being prefixed with `::`.][54404]
Previously, using a external crate in a module without a use statement
required `let json = ::serde_json::from_str(foo);` but can now be written
as `let json = serde_json::from_str(foo);`.
- [You can now apply the `#[used]` attribute to static items to prevent the
compiler from optimising them away even if they appear to be unused.][51363]
compiler from optimising them away, even if they appear to be unused,][51363]
e.g. `#[used] static FOO: u32 = 1;`
- [You can now import and reexport macros from other crates with the `use`
syntax.][50911] Macros exported with `#[macro_export]` are now placed into
the root module of the crate. If your macro relies on calling other local
macros it is recommended to export with the
`#[macro_export(local_inner_macros)]` attribute so that users won't have to
import those macros.
- [`mod.rs` files are now optional.][54146] Previously if you had a `foo` module
macros, it is recommended to export with the
`#[macro_export(local_inner_macros)]` attribute so users won't have to import
those macros.
- [`mod.rs` files are now optional.][54146] Previously, if you had a `foo` module
with a `bar` submodule, you would have `src/foo/mod.rs` and `src/foo/bar.rs`.
Now you can have `src/foo.rs` and `src/foo/bar.rs` to achieve the same effect.
- [You can now catch visibility keywords (e.g. `pub`, `pub(crate)`) in macros
using the `vis` specifier.][53370]
- [Non-macro attributes now allow all forms of literals not just
strings.][53044] e.g. Previously you would write `#[attr("true")]` you can now
- [Non-macro attributes now allow all forms of literals, not just
strings.][53044] Previously, you would write `#[attr("true")]`, and you can now
write `#[attr(true)]`.
- [You can now specify a function to handle a panic in the Rust runtime with the
`#[panic_handler]` attribute.][51366]
Expand All @@ -54,9 +54,9 @@ Stabilized APIs
- [`Ipv6Addr::UNSPECIFIED`]
- [`Iterator::find_map`]

The following methods are a replacement methods for `trim_left`, `trim_right`,
`trim_left_matches`, and `trim_right_matches`. Which will be deprecated
in 1.33.0.
The following methods are replacement methods for `trim_left`, `trim_right`,
`trim_left_matches`, and `trim_right_matches`, which will be deprecated
in 1.33.0:
- [`str::trim_end_matches`]
- [`str::trim_end`]
- [`str::trim_start_matches`]
Expand All @@ -76,12 +76,12 @@ Misc
----
- [`rustdoc` allows you to specify what edition to treat your code as with the
`--edition` option.][54057]
- [`rustdoc` now has the `--color` (Specify whether to output color) and
`--error-format` (Specify error format e.g. `json`) options.][53003]
- [`rustdoc` now has the `--color` (specify whether to output color) and
`--error-format` (specify error format, e.g. `json`) options.][53003]
- [We now distribute a `rust-gdbgui` script that invokes `gdbgui` with Rust
debug symbols.][53774]
- [Attributes from Rust tools such as `rustfmt` or `clippy` are now
available.][53459] e.g. `#[rustfmt::skip]` will skip formatting the next item.
available,][53459] e.g. `#[rustfmt::skip]` will skip formatting the next item.

[50911]: https://github.com/rust-lang/rust/pull/50911/
[51363]: https://github.com/rust-lang/rust/pull/51363/
Expand Down Expand Up @@ -153,7 +153,7 @@ Compiler

Libraries
---------
- [`Once::call_once` now no longer requires `Once` to be `'static`.][52239]
- [`Once::call_once` no longer requires `Once` to be `'static`.][52239]
- [`BuildHasherDefault` now implements `PartialEq` and `Eq`.][52402]
- [`Box<CStr>`, `Box<OsStr>`, and `Box<Path>` now implement `Clone`.][51912]
- [Implemented `PartialEq<&str>` for `OsString` and `PartialEq<OsString>`
Expand All @@ -169,10 +169,10 @@ Stabilized APIs

Cargo
-----
- [Cargo can silently fix some bad lockfiles ][cargo/5831] You can use
`--locked` to disable this behaviour.
- [Cargo can silently fix some bad lockfiles.][cargo/5831] You can use
`--locked` to disable this behavior.
- [`cargo-install` will now allow you to cross compile an install
using `--target`][cargo/5614]
using `--target`.][cargo/5614]
- [Added the `cargo-fix` subcommand to automatically move project code from
2015 edition to 2018.][cargo/5723]
- [`cargo doc` can now optionally document private types using the
Expand All @@ -184,15 +184,15 @@ Misc
the specified level to that level.][52354] For example `--cap-lints warn`
will demote `deny` and `forbid` lints to `warn`.
- [`rustc` and `rustdoc` will now have the exit code of `1` if compilation
fails, and `101` if there is a panic.][52197]
fails and `101` if there is a panic.][52197]
- [A preview of clippy has been made available through rustup.][51122]
You can install the preview with `rustup component add clippy-preview`
You can install the preview with `rustup component add clippy-preview`.

Compatibility Notes
-------------------
- [`str::{slice_unchecked, slice_unchecked_mut}` are now deprecated.][51807]
Use `str::get_unchecked(begin..end)` instead.
- [`std::env::home_dir` is now deprecated for its unintuitive behaviour.][51656]
- [`std::env::home_dir` is now deprecated for its unintuitive behavior.][51656]
Consider using the `home_dir` function from
https://crates.io/crates/dirs instead.
- [`rustc` will no longer silently ignore invalid data in target spec.][52330]
Expand Down Expand Up @@ -432,7 +432,7 @@ Language
be used as an identifier.
- [The dyn syntax is now available.][49968] This syntax is equivalent to the
bare `Trait` syntax, and should make it clearer when being used in tandem with
`impl Trait`. Since it is equivalent to the following syntax:
`impl Trait` because it is equivalent to the following syntax:
`&Trait == &dyn Trait`, `&mut Trait == &mut dyn Trait`, and
`Box<Trait> == Box<dyn Trait>`.
- [Attributes on generic parameters such as types and lifetimes are
Expand Down Expand Up @@ -495,10 +495,10 @@ Cargo
a different directory than `target` for placing compilation artifacts.
- [Cargo will be adding automatic target inference for binaries, benchmarks,
examples, and tests in the Rust 2018 edition.][cargo/5335] If your project specifies
specific targets e.g. using `[[bin]]` and have other binaries in locations
specific targets, e.g. using `[[bin]]`, and have other binaries in locations
where cargo would infer a binary, Cargo will produce a warning. You can
disable this feature ahead of time by setting any of the following `autobins`,
`autobenches`, `autoexamples`, `autotests` to false.
disable this feature ahead of time by setting any of the following to false:
`autobins`, `autobenches`, `autoexamples`, `autotests`.
- [Cargo will now cache compiler information.][cargo/5359] This can be disabled by
setting `CARGO_CACHE_RUSTC_INFO=0` in your environment.

Expand All @@ -514,8 +514,8 @@ Compatibility Notes
work.][49896] e.g. `::core::prelude::v1::StrExt::is_empty("")` will not
compile, `"".is_empty()` will still compile.
- [`Debug` output on `atomic::{AtomicBool, AtomicIsize, AtomicPtr, AtomicUsize}`
will only print the inner type.][48553] e.g.
`print!("{:?}", AtomicBool::new(true))` will print `true`
will only print the inner type.][48553] E.g.
`print!("{:?}", AtomicBool::new(true))` will print `true`,
not `AtomicBool(true)`.
- [The maximum number for `repr(align(N))` is now 2²⁹.][50378] Previously you
could enter higher numbers but they were not supported by LLVM. Up to 512MB
Expand Down Expand Up @@ -578,7 +578,7 @@ Version 1.26.2 (2018-06-05)
Compatibility Notes
-------------------

- [The borrow checker was fixed to avoid unsoundness when using match ergonomics][51117]
- [The borrow checker was fixed to avoid unsoundness when using match ergonomics.][51117]

[51117]: https://github.com/rust-lang/rust/issues/51117

Expand All @@ -589,18 +589,18 @@ Version 1.26.1 (2018-05-29)
Tools
-----

- [RLS now works on Windows][50646]
- [Rustfmt stopped badly formatting text in some cases][rustfmt/2695]
- [RLS now works on Windows.][50646]
- [Rustfmt stopped badly formatting text in some cases.][rustfmt/2695]


Compatibility Notes
--------

- [`fn main() -> impl Trait` no longer works for non-Termination
trait][50656]
trait.][50656]
This reverts an accidental stabilization.
- [`NaN > NaN` no longer returns true in const-fn contexts][50812]
- [Prohibit using turbofish for `impl Trait` in method arguments][50950]
- [`NaN > NaN` no longer returns true in const-fn contexts.][50812]
- [Prohibit using turbofish for `impl Trait` in method arguments.][50950]

[50646]: https://github.com/rust-lang/rust/issues/50646
[50656]: https://github.com/rust-lang/rust/pull/50656
Expand All @@ -616,18 +616,18 @@ Language
- [Closures now implement `Copy` and/or `Clone` if all captured variables
implement either or both traits.][49299]
- [The inclusive range syntax e.g. `for x in 0..=10` is now stable.][47813]
- [The `'_` lifetime is now stable. The underscore lifetime can be used anywhere where a
- [The `'_` lifetime is now stable. The underscore lifetime can be used anywhere a
lifetime can be elided.][49458]
- [`impl Trait` is now stable allowing you to have abstract types in returns
or in function parameters.][49255] e.g. `fn foo() -> impl Iterator<Item=u8>` or
or in function parameters.][49255] E.g. `fn foo() -> impl Iterator<Item=u8>` or
`fn open(path: impl AsRef<Path>)`.
- [Pattern matching will now automatically apply dereferences.][49394]
- [128-bit integers in the form of `u128` and `i128` are now stable.][49101]
- [`main` can now return `Result<(), E: Debug>`][49162] in addition to `()`.
- [A lot of operations are now available in a const context.][46882] E.g. You
can now index into constant arrays, reference and dereference into constants,
and use Tuple struct constructors.
- [Fixed entry slice patterns are now stable.][48516] e.g.
and use tuple struct constructors.
- [Fixed entry slice patterns are now stable.][48516] E.g.
```rust
let points = [1, 2, 3, 4];
match points {
Expand Down Expand Up @@ -1052,7 +1052,7 @@ Language
Compiler
--------
- [Enabled `TrapUnreachable` in LLVM which should mitigate the impact of
undefined behaviour.][45920]
undefined behavior.][45920]
- [rustc now suggests renaming import if names clash.][45660]
- [Display errors/warnings correctly when there are zero-width or
wide characters.][45711]
Expand Down
3 changes: 3 additions & 0 deletions src/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ dependencies = [
"itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"walkdir 2.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
Expand Down Expand Up @@ -2135,11 +2136,13 @@ 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)",
"rustc 0.0.0",
"rustc_allocator 0.0.0",
"rustc_data_structures 0.0.0",
"rustc_incremental 0.0.0",
"rustc_metadata_utils 0.0.0",
"rustc_mir 0.0.0",
"rustc_target 0.0.0",
"serialize 0.0.0",
"syntax 0.0.0",
"syntax_pos 0.0.0",
]
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ def exe_suffix():
return ''

def bootstrap_binary(self):
"""Return the path of the boostrap binary
"""Return the path of the bootstrap binary
>>> rb = RustBuild()
>>> rb.build_dir = "build"
Expand Down
2 changes: 1 addition & 1 deletion src/etc/lldb_rust_formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def print_std_string_val(val, internal_dict):
#=--------------------------------------------------------------------------------------------------

def print_array_of_values(array_name, data_ptr_val, length, internal_dict):
"""Prints a contigous memory range, interpreting it as values of the
"""Prints a contiguous memory range, interpreting it as values of the
pointee-type of data_ptr_val."""

data_ptr_type = data_ptr_val.type
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/collections/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ use self::Entry::*;
/// movie_reviews.insert("Office Space", "Deals with real issues in the workplace.");
/// movie_reviews.insert("Pulp Fiction", "Masterpiece.");
/// movie_reviews.insert("The Godfather", "Very enjoyable.");
/// movie_reviews.insert("The Blues Brothers", "Eye lyked it alot.");
/// movie_reviews.insert("The Blues Brothers", "Eye lyked it a lot.");
///
/// // check for a specific one.
/// if !movie_reviews.contains_key("Les Misérables") {
Expand Down
2 changes: 1 addition & 1 deletion src/libcompiler_builtins
2 changes: 1 addition & 1 deletion src/libcore/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ pub unsafe trait GlobalAlloc {
/// The block is described by the given `ptr` pointer and `layout`.
///
/// If this returns a non-null pointer, then ownership of the memory block
/// referenced by `ptr` has been transferred to this alloctor.
/// referenced by `ptr` has been transferred to this allocator.
/// The memory may or may not have been deallocated,
/// and should be considered unusable (unless of course it was
/// transferred back to the caller again via the return value of
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ extern "rust-intrinsic" {
/// // to avoid problems in case something further down panics.
/// src.set_len(0);
///
/// // The two regions cannot overlap becuase mutable references do
/// // The two regions cannot overlap because mutable references do
/// // not alias, and two different vectors cannot own the same
/// // memory.
/// ptr::copy_nonoverlapping(src_ptr, dst_ptr, src_len);
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/ops/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ impl<Idx: PartialOrd<Idx>> RangeTo<Idx> {
}
}

/// An range bounded inclusively below and above (`start..=end`).
/// A range bounded inclusively below and above (`start..=end`).
///
/// The `RangeInclusive` `start..=end` contains all values with `x >= start`
/// and `x <= end`. It is empty unless `start <= end`.
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ pub use marker::Unpin;
/// value in place, preventing the value referenced by that pointer from being moved
/// unless it implements [`Unpin`].
///
/// See the [`pin` module] documentation for furthur explanation on pinning.
/// See the [`pin` module] documentation for further explanation on pinning.
///
/// [`Unpin`]: ../../std/marker/trait.Unpin.html
/// [`pin` module]: ../../std/pin/index.html
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
//! underlying object is live and no reference (just raw pointers) is used to
//! access the same memory.
//!
//! These axioms, along with careful use of [`offset`] for pointer arithmentic,
//! These axioms, along with careful use of [`offset`] for pointer arithmetic,
//! are enough to correctly implement many useful things in unsafe code. Stronger guarantees
//! will be provided eventually, as the [aliasing] rules are being determined. For more
//! information, see the [book] as well as the section in the reference devoted
Expand Down
5 changes: 5 additions & 0 deletions src/libcore/task/wake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ impl LocalWaker {
}

impl From<LocalWaker> for Waker {
/// Converts a `LocalWaker` into a `Waker`.
///
/// This conversion turns a `!Sync` `LocalWaker` into a `Sync` `Waker`, allowing a wakeup
/// object to be sent to another thread, but giving up its ability to do specialized
/// thread-local wakeup behavior.
#[inline]
fn from(local_waker: LocalWaker) -> Self {
local_waker.0
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/hir/def_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl ::std::fmt::Debug for CrateNum {
match self {
CrateNum::Index(id) => write!(fmt, "crate{}", id.private),
CrateNum::Invalid => write!(fmt, "invalid crate"),
CrateNum::BuiltinMacros => write!(fmt, "bultin macros crate"),
CrateNum::BuiltinMacros => write!(fmt, "builtin macros crate"),
CrateNum::ReservedForIncrCompCache => write!(fmt, "crate for decoding incr comp cache"),
}
}
Expand Down Expand Up @@ -101,7 +101,7 @@ impl fmt::Display for CrateNum {
match self {
CrateNum::Index(id) => fmt::Display::fmt(&id.private, f),
CrateNum::Invalid => write!(f, "invalid crate"),
CrateNum::BuiltinMacros => write!(f, "bultin macros crate"),
CrateNum::BuiltinMacros => write!(f, "builtin macros crate"),
CrateNum::ReservedForIncrCompCache => write!(f, "crate for decoding incr comp cache"),
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/hir/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ impl<'a> LoweringContext<'a> {
TyKind::Slice(ref ty) => hir::TyKind::Slice(self.lower_ty(ty, itctx)),
TyKind::Ptr(ref mt) => hir::TyKind::Ptr(self.lower_mt(mt, itctx)),
TyKind::Rptr(ref region, ref mt) => {
let span = t.span.shrink_to_lo();
let span = self.sess.source_map().next_point(t.span.shrink_to_lo());
let lifetime = match *region {
Some(ref lt) => self.lower_lifetime(lt),
None => self.elided_ref_lifetime(span),
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/hir/print.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ impl<'a> State<'a> {
State {
s: pp::mk_printer(out, default_columns),
cm: Some(cm),
comments: comments.clone(),
comments,
literals: literals.unwrap_or_default().into_iter().peekable(),
cur_cmnt: 0,
boxes: Vec::new(),
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/ich/caching_codemap_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl<'cm> CachingSourceMapView<'cm> {

CachingSourceMapView {
source_map,
line_cache: [entry.clone(), entry.clone(), entry.clone()],
line_cache: [entry.clone(), entry.clone(), entry],
time_stamp: 0,
}
}
Expand Down
10 changes: 9 additions & 1 deletion src/librustc/infer/combine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ impl<'infcx, 'gcx, 'tcx> CombineFields<'infcx, 'gcx, 'tcx> {
dir: RelationDir)
-> RelateResult<'tcx, Generalization<'tcx>>
{
debug!("generalize(ty={:?}, for_vid={:?}, dir={:?}", ty, for_vid, dir);
// Determine the ambient variance within which `ty` appears.
// The surrounding equation is:
//
Expand All @@ -273,8 +274,15 @@ impl<'infcx, 'gcx, 'tcx> CombineFields<'infcx, 'gcx, 'tcx> {
root_ty: ty,
};

let ty = generalize.relate(&ty, &ty)?;
let ty = match generalize.relate(&ty, &ty) {
Ok(ty) => ty,
Err(e) => {
debug!("generalize: failure {:?}", e);
return Err(e);
}
};
let needs_wf = generalize.needs_wf;
debug!("generalize: success {{ {:?}, {:?} }}", ty, needs_wf);
Ok(Generalization { ty, needs_wf })
}
}
Expand Down
Loading