about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2020-04-09Rollup merge of #70939 - varkor:const-generics-regression-tests, r=CentrilMazdak Farrokhzad-0/+64
Add two const generics regression tests Closes https://github.com/rust-lang/rust/issues/66596. Closes https://github.com/rust-lang/rust/issues/61522.
2020-04-09Add regression test for #61522varkor-0/+40
2020-04-09Add regression test for #66596varkor-0/+24
2020-04-09Rollup merge of #70918 - tobithiel:fix_forbid_override, r=davidtwcoMazdak Farrokhzad-0/+17
rustc_session: forbid lints override regardless of position Addresses the regression reported in #70819 for command line arguments, but does not address the source code flag regression.
2020-04-09Rollup merge of #70916 - Centril:track-caller-ffi, r=eddybMazdak Farrokhzad-21/+78
Support `#[track_caller]` on functions in `extern "Rust" { ... }` Fixes https://github.com/rust-lang/rust/issues/70830 which is the follow-up to @eddyb's suggestion in https://github.com/rust-lang/rust/pull/69251#discussion_r380791634 to allow `#[track_caller]` on `fn`s in FFI imports, that is, on functions in `extern "Rust" { ... }` blocks. This requires that the other side, the FFI export, also have the `#[track_caller]` attribute. Otherwise, undefined behavior is triggered and the blame lies, as usual, with the `unsafe { ... }` block which called the FFI imported function. After this PR, all forms of `fn` items with the right ABI (`"Rust"`) support `#[track_caller]`. As a drive-by, the PR also hardens the check rejecting `#[naked] #[track_caller]` such that methods and other forms of `fn` items are also considered. r? @eddyb cc @rust-lang/lang
2020-04-09Rollup merge of #70822 - jonas-schievink:curse-of-the-recursion, ↵Mazdak Farrokhzad-0/+18
r=ecstatic-morse Don't lint for self-recursion when the function can diverge Fixes https://github.com/rust-lang/rust/issues/54444
2020-04-09Rollup merge of #70367 - nikomatsakis:issue-69307, r=Aaron1011Mazdak Farrokhzad-0/+53
save/restore `pessimistic_yield` when entering bodies This flag is used to make the execution order around `+=` operators pessimistic. Failure to save/restore the flag was causing independent async blocks to effect one another, leading to strange ICEs and failed assumptions. Fixes #69307 r? @Zoxc
2020-04-09track_caller: support on FFI importsMazdak Farrokhzad-18/+50
2020-04-09Auto merge of #70936 - Dylan-DPC:rollup-2ng3e5h, r=Dylan-DPCbors-34/+93
Rollup of 7 pull requests Successful merges: - #70134 (add basic support of OsStrExt for HermitCore) - #70565 (Add inline attributes for functions used in the query system) - #70828 (rustdoc: Don't try to load source files from external crates) - #70870 (Fix abuses of tykind::err) - #70906 (Suggest move for closures and async blocks in more cases.) - #70912 (Do not suggest adding type param when `use` is already suggested) - #70930 (add tracking issue to `VecDeque::make_contiguous`) Failed merges: r? @ghost
2020-04-08Rollup merge of #70912 - estebank:reduce-type-param-sugg-verbosity, r=davidtwcoDylan DPC-8/+0
Do not suggest adding type param when `use` is already suggested Fix #70365, cc #70572.
2020-04-08Rollup merge of #70906 - gizmondo:66107, r=estebankDylan DPC-25/+56
Suggest move for closures and async blocks in more cases. Fixes #66107, also improves #67577 Related PR https://github.com/rust-lang/rust/pull/65166
2020-04-08Rollup merge of #70828 - ollie27:rustdoc_external_macro_src, r=eddybDylan DPC-1/+37
rustdoc: Don't try to load source files from external crates Local items defined in external macros shouldn't generate rendered source files and should link to the external crate's docs instead. Part of #70757 r? @GuillaumeGomez cc @eddyb
2020-04-08Auto merge of #70721 - anyska:bless-all-mir-opt, r=oli-obkbors-4139/+10197
--bless all mir-opt tests. r? @oli-obk
2020-04-08Add ignore-wasm32-bare to mir-opt tests that need it.Ana-Maria Mihalache-338/+340
2020-04-08rustdoc: Don't try to load source files from external cratesOliver Middleton-1/+37
Local items defined in external macros shouldn't generate rendered source files and should link to the external crate's docs instead.
2020-04-08Rollup merge of #70789 - lcnr:macros, r=varkorDylan DPC-22/+49
remove false positives of unused_braces fixes #70717 We could potentially be more aggressive when linting let bindings by checking if there are any explicit `ref`s. I have been unable to create a snippet which compiles when using braces but has a borrowck error without them. The closes I've gotten is [the following (playground)](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=4a1552ebe9648cb13fcb8dd969189a6c). r? @eddyb
2020-04-08Suggest move for closures and async blocks in more cases.Alex Aktsipetrov-25/+56
2020-04-07rustc_session: forbid lints override regardless of positionTobias Thiel-0/+17
2020-04-08track_caller: harden naked interactionsMazdak Farrokhzad-3/+28
2020-04-07Do not suggest adding type param when `use` is already suggestedEsteban Küber-8/+0
Fix #70365, cc #70572.
2020-04-07Remove old mir-opt test format.Ana-Maria Mihalache-80/+2
2020-04-07Normalize away pairs of line:col numbers.Ana-Maria Mihalache-166/+166
2020-04-07Add EMIT_MIR_FOR_EACH_BIT_WIDTH to tests that need it.Ana-Maria Mihalache-488/+1855
2020-04-07--bless more mir-opt tests.Ana-Maria Mihalache-1013/+2254
2020-04-07remove false positives of unused_bracesBastian Kauschke-22/+49
2020-04-07--bless all mir-opt tests.Ana-Maria Mihalache-3046/+6572
2020-04-07Rollup merge of #70857 - faern:use-assoc-int-float-consts, r=dtolnayDylan DPC-1/+1
Don't import integer and float modules, use assoc consts 2 Follow up to #70777. I missed quite a lot of places. Partially because I wanted to keep the size of the last PR down, and partially because my regexes were not good enough :) r? @dtolnay
2020-04-07Rollup merge of #70846 - tmiasko:compiler-builtins-codegen-units, r=alexcrichtonDylan DPC-0/+40
Keep codegen units unmerged when building compiler builtins Make it possible to control how mono items are partitioned into code generation units, when compiling the compiler builtins, by retaining the original partitioning. Helps with #48625, #61063, #67960, #70489. r? @alexcrichton
2020-04-07Auto merge of #70164 - eddyb:walk-generic-arg, r=nikomatsakisbors-2/+2
ty/walk: iterate `GenericArg`s instead of `Ty`s. Before this PR, `Ty::walk` only iterated over `Ty`s, but that's becoming an increasing problem with `const` generics, as `ty::Const`s in `Substs` are missed by it. By working with `GenericArg` instead, we can handle both `Ty`s and `ty::Const`s, but also `ty::Region`s, which used to require ad-hoc mechanisms such as `push_regions`. I've also removed `TraitRef::input_types`, as it's both long obsolete, and easy to misuse.
2020-04-07Use assoc integer constants in librustc_*Linus Färnstrand-1/+1
2020-04-06traits/coherence: stop using `Ty::walk_shallow`.Eduard-Mihai Burtescu-2/+2
2020-04-06add nested regression testNiko Matsakis-0/+30
2020-04-06Auto merge of #70771 - RalfJung:ctfe-loop, r=oli-obkbors-0/+14
Miri terminator handling: only do progress sanity check for 'Call' terminator This will still catch mistakes in bad intrinsic/foreign-item shims, which is the main source of errors here. Fixes https://github.com/rust-lang/rust/issues/70723 r? @oli-obk
2020-04-06tweak rustc_layout debug outputRalf Jung-10/+10
2020-04-06Rollup merge of #70827 - estebank:shorten-sugg-span-add-lt, r=ecstatic-morseMazdak Farrokhzad-1/+1
Use smaller span for suggestion restricting lifetime
2020-04-06Rollup merge of #70739 - Centril:fix-70736, r=petrochenkovMazdak Farrokhzad-0/+85
def_collector, visit_fn: account for no body Fixes #70736 r? @petrochenkov
2020-04-06Rollup merge of #70519 - estebank:constraints-before-args-spans, r=CentrilMazdak Farrokhzad-43/+72
Tweak output of type params and constraints in the wrong order r? @Centril @varkor
2020-04-05Reduce the visual clutterEsteban Küber-54/+20
Using a single label for constraints and generic arguments.
2020-04-06Keep codegen units unmerged when building compiler builtinsTomasz Miąsko-0/+40
2020-04-06Move sanitize-inline-always test to sanitize directoryTomasz Miąsko-2/+2
2020-04-05Use smaller span for suggestion restricting lifetimeEsteban Küber-1/+1
2020-04-06Rollup merge of #70798 - estebank:satisfy, r=CentrilMazdak Farrokhzad-18/+18
"cannot resolve" → "cannot satisfy" CC #66523 r? @Centril
2020-04-06Rollup merge of #70665 - petrochenkov:linkargs, r=nagisaMazdak Farrokhzad-0/+16
Do not lose or reorder user-provided linker arguments Linker arguments are potentially order-dependent, so the order in which `-C link-arg` and `-C link-args` options are passed to `rustc` should be preserved when they are passed further to the linker. Also, multiple `-C link-args` options are now appended to each other rather than overwrite each other. In other words, `-C link-arg=a -C link-args="b c" -C link-args="d e" -C link-arg=f` is now passed as `"a" "b" "c" "d" "e" "f"` and not as `"d" "e" "a" "f"`. Addresses https://github.com/rust-lang/rust/pull/70505#issuecomment-606780163.
2020-04-06Don't lint for self-recursion when the function can divergeJonas Schievink-0/+18
2020-04-05add testRalf Jung-0/+14
2020-04-05"cannot resolve" → "cannot satisfy"Esteban Küber-18/+18
2020-04-05Rollup merge of #70815 - RalfJung:layout-debug, r=jonas-schievinkDylan DPC-6/+45
Enable layout debugging for `impl Trait` type aliases I also made it print the actual type name that the alias picks under the hood.
2020-04-05also print type typeRalf Jung-5/+5
2020-04-05also print rustc_layout on impl trait type aliasesRalf Jung-2/+41
2020-04-05Rollup merge of #70806 - RalfJung:miri-assignment-check, r=eddybDylan DPC-0/+10
fix Miri assignment sanity check Thanks @eddyb for pointing me to the right APIs! r? @eddyb Fixes https://github.com/rust-lang/rust/issues/70804