about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2018-08-28Fix warnings about the `native` target-cpuAlex Crichton-2/+17
This fixes a regression from #53031 where specifying `-C target-cpu=native` is printing a lot of warnings from LLVM about `native` being an unknown CPU. It turns out that `native` is indeed an unknown CPU and we have to perform a mapping to an actual CPU name, but this mapping is only performed in one location rather than all locations we inform LLVM about the target CPU. This commit centralizes the mapping of `native` to LLVM's value of the native CPU, ensuring that all locations we inform LLVM about the `target-cpu` it's never `native`. Closes #53322
2018-08-28Auto merge of #53493 - matthewjasper:hair-spans, r=nikomatsakisbors-183/+116
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-13/+11
NLL: experiment with inverting liveness I got inspired to see what would happen here. Fixes #52460 r? @pnkfelix
2018-08-28Auto merge of #53616 - varkor:hir-map-rename, r=nikomatsakisbors-1/+2
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 #53272 - mark-i-m:anon_param_error_now, r=nikomatsakisbors-12/+12
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-7/+7
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-27Rename hir::map::NodeKind to hir::Nodevarkor-2/+2
2018-08-27Remove path prefixes from NodeKindvarkor-1/+2
2018-08-27Rename hir::map::Node to hir::map::NodeKindvarkor-1/+1
2018-08-27Auto merge of #51456 - qmx:crate-in-path, r=nikomatsakisbors-0/+72
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-27merge `PointIndexMap` and `RegionValueElements`Niko Matsakis-9/+9
2018-08-27implement liveness tracing, remove old liveness systemNiko Matsakis-4/+2
2018-08-27Auto merge of #53441 - toidiu:ak-fix53419, r=nikomatsakisbors-0/+21
fix for late-bound regions Fix for https://github.com/rust-lang/rust/issues/53419 r? @nikomatsakis
2018-08-27fix anotherMark Mansi-1/+1
2018-08-27fix some anon paramsMark Mansi-7/+7
2018-08-27Auto merge of #53580 - nikomatsakis:nll-issue-53568, r=pnkfelixbors-0/+98
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-3/+3
2018-08-27Also use smaller spans for unsize adjustmentsMatthew Jasper-89/+55
2018-08-27Auto merge of #53624 - Zoxc:ice-fix, r=oli-obkbors-1/+3
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-27Move with_globals setup from run_compiler to runJohn Kåre Alsaker-1/+3
2018-08-26rustc: Continue to tweak "std internal symbols"Alex Crichton-1/+69
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-26Auto merge of #53619 - japaric:panic-handler, r=SimonSapinbors-64/+134
add #[panic_handler]; deprecate #[panic_implementation] r? @SimonSapin cc #44489
2018-08-26Auto merge of #53567 - alexcrichton:update-cargo, r=Mark-Simulacrumbors-2/+2
Update Cargo submodule Also update Cargo's dependencies while we're at it
2018-08-25Update Cargo submoduleAlex Crichton-2/+2
Also update Cargo's dependencies while we're at it
2018-08-25Auto merge of #53612 - mark-i-m:anon_param_disallowed_2018, r=petrochenkovbors-82/+63
Remove anonymous trait params from 2018 and beyond cc @Centril @nikomatsakis cc #41686 rust-lang/rfcs#2522 #53272 This PR removes support for anonymous trait parameters syntactically in rust 2018 and onward. TODO: - [x] Add tests
2018-08-25Auto merge of #53584 - mcr431:Fix-#53525, r=varkorbors-251/+83
Fix #53525 - Unify E0243, E0244, E0087, E0088, E0089, and E0090 into E0107 Fix #53525 This pr merges all errors related to too many or too few generic arguments in types and functions. E0243, E0244, E0087, E0088, E0089, E0090 errors will no longer be emitted and E0107 will be used instead.
2018-08-25Use smaller span for adjustments on block expressionsMatthew Jasper-94/+61
2018-08-25Auto merge of #53577 - GuillaumeGomez:rustdoc-substring-search, ↵bors-0/+20
r=QuietMisdreavus Search a substring instead of start of string in rustdoc search Fixes #49762. r? @QuietMisdreavus
2018-08-24Auto merge of #53225 - nikomatsakis:nll-type-annot, r=pnkfelixbors-21/+1280
MIR: support user-given type annotations on fns, structs, and enums This branch adds tooling to track user-given type annotations on functions, structs, and enum variant expressions. The user-given types are passed onto NLL which then enforces them. cc #47184 — not a complete fix, as there are more cases to cover r? @eddyb cc @rust-lang/wg-compiler-nll
2018-08-24fix testsMark Mansi-36/+6
2018-08-24oopsMark Mansi-2/+0
2018-08-24Add/update tests for 2015, 2018, rustfixMark Mansi-75/+75
2018-08-24Start working on a testMark Mansi-0/+13
2018-08-24Auto merge of #53460 - JoshBrudnak:master, r=estebankbors-0/+31
Fix compile panic on non existent type return Reverted the change https://github.com/rust-lang/rust/commit/28a76a90009d605349babcd2755962ab93913327#diff-4ed25c00aceb84666fca639cf8101c7cL1069 which was panicking when returning a type that cannot be found in the current scope and added testing for the compile error. For example: ```rust fn addition() -> Wrapper<impl A> {} ``` Where Wrapper is undefined in the scope.
2018-08-24address pnkfelix nitsNiko Matsakis-25/+48
2018-08-24pacify the mercilous tidy: adt-nullary-enums testNiko Matsakis-17/+32
2018-08-24ufcs with annot in position 1 and 2Niko Matsakis-0/+240
2018-08-24rename test caseNiko Matsakis-5/+5
the 3 is because the type arguments are in the 3rd position
2018-08-24add test for method ufcs notationNiko Matsakis-0/+122
2018-08-24support user-given types in adtsNiko Matsakis-0/+556
2018-08-24support user annotations in fns, methodsNiko Matsakis-0/+223
2018-08-24add a `user_substs` table and store the annotations in thereNiko Matsakis-0/+80
2018-08-24Auto merge of #53662 - kennytm:rollup, r=kennytmbors-9/+95
Rollup of 16 pull requests Successful merges: - #53311 (Window Mutex: Document that we properly initialize the SRWLock) - #53503 (Discourage overuse of mem::forget) - #53545 (Fix #50865: ICE on impl-trait returning functions reaching private items) - #53559 (add macro check for lint) - #53562 (Lament the invincibility of the Turbofish) - #53563 (use String::new() instead of String::from(""), "".to_string(), "".to_owned() or "".into()) - #53592 (docs: minor stylistic changes to str/string docs) - #53594 (Update RELEASES.md to include clippy-preview) - #53600 (Fix a grammatical mistake in "expected generic arguments" errors) - #53614 (update nomicon and book) - #53617 (tidy: Stop requiring a license header) - #53618 (Add missing fmt examples) - #53636 (Prefer `.nth(n)` over `.skip(n).next()`.) - #53644 (Use SmallVec for SmallCStr) - #53664 (Remove unnecessary closure in rustc_mir/build/mod.rs) - #53666 (Added rustc_codegen_llvm to compiler documentation.)
2018-08-24Rollup merge of #53545 - FelixMcFelix:fix-50865-beta, r=petrochenkovkennytm-0/+49
Fix #50865: ICE on impl-trait returning functions reaching private items Adds a test case as suggested in #50865, and implements @petrochenkov's suggestion. Fixes #50865. Impl-trait-returning functions are marked under a new (low) access level, which they propagate rather than `AccessLevels::Reachable`. `AccessLevels::is_reachable` returns false for such items (leaving stability analysis unaffected), these items may still be visible to the lints phase however.
2018-08-24Auto merge of #53044 - SergioBenitez:stable-attr-literals, r=petrochenkovbors-171/+29
Stabilize 'attr_literals' feature. RFC Issue: rust-lang/rfcs#1559 Tracking Issue: rust-lang/rust#34981 Reference PR: https://github.com/rust-lang-nursery/reference/pull/388.
2018-08-24updates tests to use new error codeMatthew Russo-185/+83
2018-08-24Merging error code descriptions into E0107 and adding "no longerMatthew Russo-66/+0
emitted" messages to the others.
2018-08-24Rollup merge of #53636 - frewsxcv:frewsxcv-nth, r=rkruppekennytm-2/+2
Prefer `.nth(n)` over `.skip(n).next()`. Found by clippy.