about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-02-13Rollup merge of #58381 - davidtwco:issue-42944, r=estebankMazdak Farrokhzad-17/+63
Only suggest imports if not imported. Fixes #42944 and fixes #53430. This commit modifies name resolution error reporting so that if a name is in scope and has been imported then we do not suggest importing it. This can occur when we add a label about constructors not being visible due to private fields. In these cases, we know that the struct/variant has been imported and we should silence any suggestions to import the struct/variant. r? @estebank
2019-02-13Rollup merge of #58354 - matthewjasper:mir-dump-fixes, r=wesleywiserMazdak Farrokhzad-2/+69
Fix ICE and invalid filenames in MIR printing code * Don't panic when printing MIR for associated constants * Don't use `<` and `>` in filenames, since they aren't allowed on Windows. r? @eddyb cc @RalfJung
2019-02-13Rollup merge of #58276 - varkor:missing-stability-attr-top-level, r=davidtwcoMazdak Farrokhzad-22/+40
Improve the error messages for missing stability attributes This makes the capitalisation consistent and provides more context (especially for missing top-level attributes).
2019-02-13Rollup merge of #58272 - fitzgen:num-format-code-size, r=Mark-SimulacrumMazdak Farrokhzad-74/+157
Cut down on number formating code size r? @alexcrichton
2019-02-13Rollup merge of #58202 - varkor:deprecated-future-external, r=GuillaumeGomezMazdak Farrokhzad-92/+134
Ignore future deprecations in #[deprecated] The future deprecation warnings should only apply to `#[rustc_deprecated]` as they take into account rustc's version. Fixes #57952. I've also slightly modified rustdoc's display of future deprecation notices to make it more consistent, so I'm assigning a rustdoc team member for review to make sure this is okay. r? @GuillaumeGomez
2019-02-13Rollup merge of #58167 - ljedrz:HirIdify_body_id, r=ZoxcMazdak Farrokhzad-147/+175
HirId-ify hir::BodyId Another step towards https://github.com/rust-lang/rust/pull/57578.
2019-02-13libpanic_unwind => 2018: remove unused extern crate.Mazdak Farrokhzad-3/+0
2019-02-13libpanic_unwind => 2018: fix ICEs.Mazdak Farrokhzad-6/+7
2019-02-13libpanic_unwind => 2018Mazdak Farrokhzad-12/+13
2019-02-13Stabilize TryFrom and TryIntoSimon Sapin-38/+30
2019-02-13Use convert::Infallible instead of never in the blanket TryFrom implSimon Sapin-5/+15
2019-02-13Add a convert::Infallible empty enum, make string::ParseError an aliasSimon Sapin-36/+97
2019-02-13review or fix miri failures in iter, slice, cell, timeRalf Jung-15/+11
2019-02-13mark failures expected due to panicsRalf Jung-15/+15
2019-02-13simplified conditionalClint Frederickson-3/+1
2019-02-13fix Box::into_unique effecitvely transmuting to a raw ptrRalf Jung-3/+8
2019-02-13fix invalidating references in BTree iteratorsRalf Jung-13/+21
2019-02-13fix overlapping mutable and shared references in BTreeMap's into_slices_mutRalf Jung-3/+22
2019-02-13check if `used_place` and `moved_place` are equal when determining if the ↵Clint Frederickson-4/+2
move was partial
2019-02-13Convert old doc links to current editionLzu Tao-50/+65
Use footnote style to bypass the tidy check
2019-02-13Auto merge of #56951 - oli-obk:auto_toolstate_issue, r=kennytmbors-3/+83
Automatically open an issue when a tool breaks cc @nikomatsakis fixes https://github.com/rust-lang-nursery/rust-toolstate/issues/6 documentation about issue opening via the github api: https://developer.github.com/v3/issues/#create-an-issue
2019-02-13Move the intrinsics into a submoduleValentin Tolmer-215/+249
2019-02-13Add Instant::saturating_duration_sinceVitaly _Vi Shukela-0/+28
2019-02-13Relax some Ord bounds on BinaryHeap<T>Anthony Ramine-244/+244
Notably, iterators don't require any trait bounds to be iterated.
2019-02-13Relax Read bounds on a bunch of BufReader<R> methodsAnthony Ramine-0/+2
2019-02-13Relax some Hash bounds on HashMap<K, V, S> and HashSet<T, S>Anthony Ramine-364/+354
Notably, hash iterators don't require any trait bounds to be iterated.
2019-02-13Add FreeBSD armv6 and armv7 targetsMikaelUrankar-0/+54
2019-02-13target/uefi: clarify documentationDavid Rheinsberg-12/+17
This clarifies why FP-units are disabled on UEFI targets, as well as why we must opt into the NXCOMPAT feature. I did find some time to investigate why GRUB and friends disable FP on UEFI. The specification explicitly allows using MMX/SSE/AVX, but as it turns out it does not mandate enabling the instruction sets explicitly. Hence, any use of these instructions will trigger CPU exceptions, unless an application explicitly enables them (which is not an option, as these are global flags that better be controlled by the kernel/firmware). Furthermore, UEFI systems are allowed to mark any non-code page as non-executable. Hence, we must make sure to never place code on the stack or heap. So we better pass /NXCOMPAT to the linker for it to complain if it ever places code in non-code pages. Lastly, this fixes some typos in related comments.
2019-02-13Auto merge of #58238 - Mark-Simulacrum:doctest-fix, r=alexcrichtonbors-24/+23
Fixes rustdoc in stage 0, stage 1 When a request for rustdoc is passed for stage 0, x.py build --stage 0 src/tools/rustdoc or ensure(tool::Rustdoc { .. }) with top_stage = 0, we return the rustdoc for that compiler (i.e., the beta rustdoc). This fixes stage 0 of https://github.com/rust-lang/rust/issues/52186 as well as being part of general workflow improvements (making stage 0 testing for std work) for rustbuild. The stage 1 fix (second commit) completely resolves the problem, so this fixes https://github.com/rust-lang/rust/issues/52186.
2019-02-13Fix tests for checked_duration_sinceVitaly _Vi Shukela-1/+3
2019-02-13fix rebase falloutRalf Jung-1/+1
2019-02-13fix whitespaceRalf Jung-1/+1
2019-02-13make bin_op and unary_op APIs consistently work on ImmTyRalf Jung-65/+66
2019-02-13make OpTy.op private, and ImmTy.imm public insteadRalf Jung-65/+80
2019-02-13HirId-ify hir::BodyIdljedrz-147/+175
2019-02-13Auto merge of #58235 - jethrogb:jb/sgx-usercall-internals, r=alexcrichtonbors-84/+59
SGX target: simplify usercall internals This moves logic from assembly to Rust and removes the special case for exit/panic handling, merging it with regular usercall handling. Also, this fixes a bug in the exit usercall introduced in a75ae00. The bug would make regular exits look like panics with high probability. It would also with some probability leak information through uncleared registers. cc @VardhanThigle r? @alexcrichton
2019-02-13Clarify guarantees for `Box` allocationJethro Beekman-0/+13
2019-02-12Merging masterMatthias Einwag-14469/+17675
2019-02-12Revert "Remove mentions of unstable sort_by_cached key from stable ↵Scott McMurray-0/+8
documentation" This reverts commit 9c7b69e17909ceb090a1c4b8882a4e0924a2a755.
2019-02-12Stabilize slice_sort_by_cached_keyScott McMurray-14/+1
2019-02-13Rollup merge of #58405 - gnzlbg:remove_unused_macros, r=alexcrichtonMazdak Farrokhzad-14/+0
Remove some dead code from libcore These macros are not required to glue the `core_arch` crate anymore.
2019-02-13Rollup merge of #58404 - euclio:cloudabi-keyserver, r=alexcrichtonMazdak Farrokhzad-5/+4
use Ubuntu keyserver for CloudABI ports The Ubuntu keyserver is more reliable than the MIT PGP server, which is prone to going down. This commit also explicitly uses port 80 on the keyserver for reasons outlined in #57844.
2019-02-13Rollup merge of #58387 - alexreg:fix-trait-alias-2, r=centrilMazdak Farrokhzad-1/+28
Disallow `auto` trait alias syntax See https://github.com/rust-lang/rust/issues/41517#issuecomment-462567679. r? @Centril CC @topecongiro @nikomatsakis
2019-02-13Rollup merge of #58289 - haraldh:master, r=sfacklerMazdak Farrokhzad-0/+152
impl iter() for dyn Error Examples: ```rust let next_error_type_a = err .iter() .filter_map(Error::downcast_ref::<ErrorTypeA>) .next(); ``` ```rust let source_root_error = err.iter().last(); ``` Credit for the ErrorIter goes to reddit user /u/tdiekmann (Tim Diekmann) https://www.reddit.com/r/rust/comments/aj3lpg/is_an_iterator_impl_over_errorsource_possible/
2019-02-13Rollup merge of #58273 - taiki-e:rename-dependency, r=matthewjasperMazdak Farrokhzad-121/+114
Rename rustc_errors dependency in rust 2018 crates I think this is a better solution than `use rustc_errors as errors` in `lib.rs` and `use crate::errors` in modules. Related: rust-lang/cargo#5653 cc #58099 r? @Centril
2019-02-13Rollup merge of #58200 - RalfJung:str-as-mut-ptr, r=SimonSapinMazdak Farrokhzad-7/+23
fix str mutating through a ptr derived from &self Found by Miri: In `get_unchecked_mut` (also used by the checked variants internally) uses `str::as_ptr` to create a mutable reference, but `as_ptr` takes `&self`. This means the mutable references we return here got created from a shared reference, which violates the shared-references-are-read-only discipline! For this by using a newly introduced `as_mut_ptr` instead.
2019-02-13Rollup merge of #58166 - euclio:deprecation-shorthand, r=petrochenkovMazdak Farrokhzad-67/+117
allow shorthand syntax for deprecation reason Fixes #48271. Created based on discussion in #56896.
2019-02-13Rollup merge of #58137 - ljedrz:cleanup_node_id_to_type, r=estebankMazdak Farrokhzad-61/+52
Cleanup: rename node_id_to_type(_opt) Renames `node_id_to_type(_opt)` to `hir_id_to_type(_opt)`; this makes it clear we are dealing with HIR nodes and their IDs here. In addition, a drive-by commit removing `ty::item_path::hir_path_str` (as requested by @eddyb).
2019-02-13Rollup merge of #58057 - michaelwoerister:stabilize-xlto, r=alexcrichtonMazdak Farrokhzad-61/+172
Stabilize linker-plugin based LTO (aka cross-language LTO) This PR stabilizes [linker plugin based LTO](https://github.com/rust-lang/rust/issues/49879), also known as "cross-language LTO" because it allows for doing inlining and other optimizations across language boundaries in mixed Rust/C/C++ projects. As described in the tracking issue, it works by making `rustc` emit LLVM bitcode instead of machine code, the same as `clang` does. A linker with the proper plugin (like LLD) can then run (Thin)LTO across all modules. The feature has been implemented over a number of pull requests and there are various [codegen](https://github.com/rust-lang/rust/blob/master/src/test/codegen/no-dllimport-w-cross-lang-lto.rs) and [run](https://github.com/rust-lang/rust/tree/master/src/test/run-make-fulldeps/cross-lang-lto-clang)-[make](https://github.com/rust-lang/rust/tree/master/src/test/run-make-fulldeps/cross-lang-lto-upstream-rlibs) [tests](https://github.com/rust-lang/rust/tree/master/src/test/run-make-fulldeps/cross-lang-lto) that make sure that it keeps working. It also works for building big projects like [Firefox](https://treeherder.mozilla.org/#/jobs?repo=try&revision=2ce2d5ddcea6fbff790503eac406954e469b2f5d). The PR makes the feature available under the `-C linker-plugin-lto` flag. As discussed in the tracking issue it is not cross-language specific and also not LLD specific. `-C linker-plugin-lto` is descriptive of what it does. If someone has a better name, let me know `:)`
2019-02-13Rollup merge of #58034 - faern:stabilize-time-checked-add, r=alexcrichtonMazdak Farrokhzad-8/+8
Stabilize the time_checked_add feature Closes #55940 Stabilizes `checked_add` and `checked_sub` on `Instant` and `SystemTime`.