about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2018-09-13give a more informative failure in this caseNiko Matsakis-1/+8
2018-08-29Replace bug! call with OverflowGuillaume Gomez-1/+1
2018-08-28Auto merge of #53679 - japaric:cortex-r, r=alexcrichtonbors-42/+139
add more Cortex-R targets This expands on PR #53663 to complete the set of Cortex-R targets and builds rust-std components for them. r? @alexcrichton each extra rust-std component (there's 4 of them) takes about 3 minutes to build on my local machine. In terms of stability (LLVM codegen bugs) these new targets should be as stable as the Cortex-M ones (e.g. `thumbv7m-none-eabi`). If the extra build time is too much we can leave the rust-std components out for now closes #53663 cc @paoloteti
2018-08-28Auto merge of #53493 - matthewjasper:hair-spans, r=nikomatsakisbors-184/+143
Use smaller span for adjustments on block expressions When returning a mutable reference don't use the entire body of the function as the span for the adjustments at the end. The error [in this case](https://github.com/rust-lang/rust/compare/master...matthewjasper:hair-spans?expand=1#diff-ecef8b1f15622fb48a803c9b61605c78) is worse, but neither error message is really what we want. I have some ideas on how to get a better error message that will have to wait for a future PR.
2018-08-28Auto merge of #53314 - nikomatsakis:nll-invert-liveness, r=pnkfelixbors-608/+1001
NLL: experiment with inverting liveness I got inspired to see what would happen here. Fixes #52460 r? @pnkfelix
2018-08-28Fix definition of `LocalUseMapBuild` so that it can build under stage0,Felix S. Klock II-1/+1
which does not have as many feature gates enabled.
2018-08-28Auto merge of #53616 - varkor:hir-map-rename, r=nikomatsakisbors-749/+628
Restructure hir::map::Node and hir::map::Entry - Moves `hir::map::Node` to `hir::Node` and removes the `Node*` prefix from its variants. - Changes `hir::map::Entry` to a struct `hir::map::Entry`. - Removes the `Node*` prefix from each of `AnnNode`s variants. r? @eddyb
2018-08-28Auto merge of #53404 - oconnor663:current_dir_behavior, r=alexcrichtonbors-0/+10
document the platform-specific behavior of Command::current_dir See also https://github.com/rust-lang/rust/issues/37868. Here's my initial wording: > Note that if the program path is relative (e.g. `"./script.sh"`), the interaction between that path and `current_dir` varies across platforms. Windows currently ignores `current_dir` when locating the program, but Unix-like systems interpret the program path relative to `current_dir`. These implementation details aren't considered stable, and it's recommended to call `canonicalize` to get an absolute program path instead of using relative paths and `current_dir` together. I'd like to get feedback on: - _Should_ we consider those details stable? It might be disruptive to change them, regardless of what I can get away with claiming in docs :) - Is `canonicalize` an appropriate recommendation? As discussed in #37868 above, there are reasons it's not called automatically in the `Command` implementation.
2018-08-28Auto merge of #53272 - mark-i-m:anon_param_error_now, r=nikomatsakisbors-18/+23
Warn on anon params in 2015 edition cc #41686 https://github.com/rust-lang/rfcs/pull/2522 cc @Centril @nikomatsakis TODO: - [x] Make sure the tests pass. - [x] Make sure there is rustfix-able suggestion. Current plan is to just suggest `_ : Foo` - [x] Add a rustfix ui test. EDIT: It seems I already did the last two in #48309
2018-08-27Auto merge of #53227 - nivkner:pin_move, r=RalfJungbors-365/+496
move the Pin API into its own module for centralized documentation This implements the change proposed by @withoutboats in #49150, as suggested by @RalfJung in the review of #53104, along with the documentation that was originally in it, that was deemed more appropriate in module-level documentation. r? @RalfJung
2018-08-27Revert crate root changesvarkor-1/+10
2018-08-27Make small modificationsvarkor-21/+7
2018-08-27Rename hir::map::NodeKind to hir::Nodevarkor-507/+500
2018-08-27Convert EntryKind to a struct, Entryvarkor-243/+118
2018-08-27Remove path prefixes from NodeKindvarkor-164/+186
2018-08-27Remove Node* prefix from AnnNodevarkor-69/+65
2018-08-27Rename hir::map::Node to hir::map::NodeKindvarkor-457/+457
2018-08-27Rename MapEntry to EntryKindvarkor-161/+159
2018-08-27Auto merge of #51456 - qmx:crate-in-path, r=nikomatsakisbors-22/+138
resolve suggestions should use `crate::` when enabled I couldn't find a way to add a specific assertion for the ui test, so the expected output is living under the `crates-in-path.stderr` ui test. - is this the right place for the test? fixes #51212
2018-08-27fix test stderrsMark Mansi-4/+4
2018-08-27make `to_location` O(1)Niko Matsakis-42/+23
2018-08-27merge `PointIndexMap` and `RegionValueElements`Niko Matsakis-140/+88
2018-08-27micro-optimize dominator codeNiko Matsakis-2/+2
2018-08-27kill dead code from `util/liveness`Niko Matsakis-171/+9
2018-08-27improve comment on `LiveVar`Niko Matsakis-2/+7
2018-08-27rename `LocalWithRegion` to `LiveVar`Niko Matsakis-22/+22
2018-08-27comment what `trace` doesNiko Matsakis-0/+14
2018-08-27fix commentNiko Matsakis-3/+4
2018-08-27enable feature `impl_header_lifetime_elision`Niko Matsakis-0/+2
2018-08-27liveness.rs: rustfmtNiko Matsakis-6/+7
2018-08-27implement liveness tracing, remove old liveness systemNiko Matsakis-338/+963
2018-08-27update comment in the interest of precisionNiko Matsakis-6/+10
2018-08-27remove the liveness mode and simplify `categorize`Niko Matsakis-43/+17
Less modes!
2018-08-27Auto merge of #53441 - toidiu:ak-fix53419, r=nikomatsakisbors-23/+94
fix for late-bound regions Fix for https://github.com/rust-lang/rust/issues/53419 r? @nikomatsakis
2018-08-27Fix anon param + make it allow-by-defMark Mansi-3/+10
2018-08-27fix anotherMark Mansi-1/+1
2018-08-27fix some anon paramsMark Mansi-8/+8
2018-08-27oopsMark Mansi-3/+1
2018-08-27warn on anon params in 015Mark Mansi-1/+1
2018-08-27Auto merge of #53580 - nikomatsakis:nll-issue-53568, r=pnkfelixbors-27/+211
fix NLL ICEs Custom type-ops reuse some of the query machinery -- but while query results are canonicalized after they are constructed, custom type ops are not, and hence we have to resolve the type variables to avoid an ICE here. Also, use the type-op machinery for implied outlives bounds. Fixes #53568 Fixes #52992 Fixes #53680
2018-08-27add test for the suggestion from preludeDouglas Campos-0/+37
2018-08-27no need to special case stdDouglas Campos-11/+7
2018-08-27Auto merge of #53656 - nnethercote:HybridIdxSet-tweaks, r=nikomatsakisbors-84/+110
`HybridIdxSet` tweaks A couple of tweaks to `HybridIdxSet`. r? @nikomatsakis
2018-08-27Also use smaller spans for unsize adjustmentsMatthew Jasper-89/+62
2018-08-27Auto merge of #53624 - Zoxc:ice-fix, r=oli-obkbors-58/+47
Move with_globals setup from run_compiler to run An alternative to https://github.com/rust-lang/rust/pull/53526 Note this breaks some miri stuff and clippy since they call `run_compiler` directly, and they now need to also call `with_globals ` cc @rust-lang/dev-tools r? @oli-obk
2018-08-27Auto merge of #53648 - japaric:thumb-lld, r=alexcrichtonbors-11/+10
change the default linker of the ARM Cortex-M targets to rust-lld so users won't need an external linker to build programs This will break nightly builds. We discussed this within the embedded WG and with the embedded community in rust-embedded/wg#160 and there was consensus in that this breaking change is worthwhile and that we should do it now before it becomes impossible to do without breaking stable builds. We have already written an announcement (see rust-embedded/wg#196) that explains the breakage and instructs the users how to fix their builds. The TL;DR is that they can switch to the old behavior by passing the `-C linker` flag to rustc. We'll post the announcement as soon as this change makes into nightly. closes rust-embedded/wg#160 r? @alexcrichton
2018-08-27Update clippyJohn Kåre Alsaker-29/+16
2018-08-27Auto merge of #53640 - alexcrichton:more-symbol-tweaks, r=michaelwoeristerbors-35/+151
rustc: Continue to tweak "std internal symbols" In investigating [an issue][1] with `panic_implementation` defined in an executable that's optimized I once again got to rethinking a bit about the `rustc_std_internal_symbol` attribute as well as weak lang items. We've sort of been non-stop tweaking these items ever since their inception, and this continues to the trend. The crux of the bug was that in the reachability we have a [different branch][2] for non-library builds which meant that weak lang items (and std internal symbols) weren't considered reachable, causing them to get eliminiated by ThinLTO passes. The fix was to basically tweak that branch to consider these symbols to ensure that they're propagated all the way to the linker. Along the way I've attempted to erode the distinction between std internal symbols and weak lang items by having weak lang items automatically configure fields of `CodegenFnAttrs`. That way most code no longer even considers weak lang items and they're simply considered normal functions with attributes about the ABI. In the end this fixes the final comment of #51342 [1]: https://github.com/rust-lang/rust/issues/51342#issuecomment-414368019 [2]: https://github.com/rust-lang/rust/blob/35bf1ae25799a4e62131159f052e0a3cbd27c960/src/librustc/middle/reachable.rs#L225-L238
2018-08-27Move with_globals setup from run_compiler to runJohn Kåre Alsaker-29/+31
2018-08-26rustc: Continue to tweak "std internal symbols"Alex Crichton-35/+151
In investigating [an issue][1] with `panic_implementation` defined in an executable that's optimized I once again got to rethinking a bit about the `rustc_std_internal_symbol` attribute as well as weak lang items. We've sort of been non-stop tweaking these items ever since their inception, and this continues to the trend. The crux of the bug was that in the reachability we have a [different branch][2] for non-library builds which meant that weak lang items (and std internal symbols) weren't considered reachable, causing them to get eliminiated by ThinLTO passes. The fix was to basically tweak that branch to consider these symbols to ensure that they're propagated all the way to the linker. Along the way I've attempted to erode the distinction between std internal symbols and weak lang items by having weak lang items automatically configure fields of `CodegenFnAttrs`. That way most code no longer even considers weak lang items and they're simply considered normal functions with attributes about the ABI. In the end this fixes the final comment of #51342 [1]: https://github.com/rust-lang/rust/issues/51342#issuecomment-414368019 [2]: https://github.com/rust-lang/rust/blob/35bf1ae25799a4e62131159f052e0a3cbd27c960/src/librustc/middle/reachable.rs#L225-L238