about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2020-04-08Redesign the Step traitCAD97-21/+5
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-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-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
2020-04-05add testRalf Jung-0/+10
2020-04-05Rollup merge of #70768 - petrochenkov:macambig, r=Centril,mark-i-mDylan DPC-0/+13
macro_rules: `NtLifetime` cannot start with an identifier Fixes https://github.com/rust-lang/rust/issues/70446
2020-04-05Rollup merge of #70748 - ogoffart:enum-layout-optim2, r=eddybDylan DPC-0/+25
Do not disable field reordering on enums with big discriminant The field are always re-ordered to minimize padding, regardless of the alignment of the discriminant (spinoff from #70477)
2020-04-04Do not lose or reorder user-provided linker argumentsVadim Petrochenkov-0/+16
2020-04-04macro_rules: `NtLifetime` cannot start with an identifierVadim Petrochenkov-0/+13
2020-04-04Auto merge of #70272 - eddyb:type-of-impl-trait, r=nikomatsakisbors-124/+167
typeck/type_of: let wfcheck handle generics in opaque types' substs. I was working on #70164, and `type_of`'s handling of opaque types seemed to be, by far, the trickiest use of `Ty::walk`, but I believe it wasn't doing anything (see https://github.com/rust-lang/rust/pull/57896#discussion_r396064431 - I suspect, based on glancing at the PR discussion, that an early attempt was kept in, despite becoming just an overcomplicated way to do exactly the same as the previous simple type equality check). I would've loved to remove `ResolvedOpaqueTy` (keep the `Ty` and lose the `Substs`), but it looks like the MIR borrowck part of the process needs that now, so it would've been added anyway since #57896, even if that PR hadn't happened. <hr/> In the process, I've moved the remaining substitution validation to `wfcheck`, which was already handling lifetimes, and kept only `delay_span_bug`s in `type_of`, as an insurance policy. I've added tests for lifetime and const cases, they seem to be checked correctly now. (and more uniform than they were in https://github.com/rust-lang/rust/issues/63063#issuecomment-602162804) However, the quality of the errors is maybe a bit worse, and they don't trigger when there are other errors (not sure if this is due to compilation stop points or something more specific to one opaque type). r? @nikomatsakis cc @matthewjasper @oli-obk @Aaron1011
2020-04-04tests: add tests for lifetime and const params of opaque types.Eduard-Mihai Burtescu-27/+94
2020-04-04typeck/type_of: let wfcheck handle duplicate generics in opaque types' substs.Eduard-Mihai Burtescu-42/+26
2020-04-04typeck/type_of: let wfcheck handle concrete types in opaque types' substs.Eduard-Mihai Burtescu-46/+51
2020-04-04typeck/type_of: don't ignore incorrect defining uses of opaque types.Eduard-Mihai Burtescu-59/+46
2020-04-04typeck/type_of: simplify checking of opaque types with multipler defining uses.Eduard-Mihai Burtescu-3/+3
2020-04-04Auto merge of #69718 - arlosi:debughash, r=eddybbors-3/+15
Add hash of source files in debug info LLVM supports placing the hash of source files inside the debug info. This information can be used by a debugger to verify that the source code matches the executable. This change adds support for both hash algorithms supported by LLVM, MD5 and SHA1, controlled by a target option. * DWARF only supports MD5 * LLVM IR supports MD5 and SHA1 (and SHA256 in LLVM 11). * CodeView (.PDB) supports MD5, SHA1, and SHA256. Fixes #68980. Tracking issue: #70401 rustc dev guide PR with further details: https://github.com/rust-lang/rustc-dev-guide/pull/623
2020-04-03Auto merge of #70156 - michaelwoerister:incr-cgus, r=nikomatsakisbors-0/+42
Make the rustc respect the `-C codegen-units` flag in incremental mode. This PR implements (the as of yet unapproved) major change proposal at https://github.com/rust-lang/compiler-team/issues/245. See the description there for background and rationale. The changes are pretty straightforward and should be easy to rebase if the proposal gets accepted at some point. r? @nikomatsakis cc @pnkfelix
2020-04-03Do not disable field reordering on enums with big discriminantOlivier Goffart-0/+25
The field are always re-ordered to minimize padding, regardless of the alignment of the discriminant
2020-04-03Rollup merge of #70741 - DutchGhost:test-59023, r=CentrilMazdak Farrokhzad-0/+17
Add test for #59023 Adds a test for https://github.com/rust-lang/rust/issues/59023 Closes https://github.com/rust-lang/rust/issues/59023
2020-04-03Rollup merge of #70720 - ecstatic-morse:issue-70637, r=oli-obkMazdak Farrokhzad-0/+12
Place TLS initializers with relocations in .tdata Should fix #70673, although I'm not sure how to test this. Perhaps @joshlf could find a MCVE? Also adds more context to the FIXME. r? @oli-obk
2020-04-03Rollup merge of #70640 - jonas-schievink:async-ice, r=cramertjMazdak Farrokhzad-0/+56
Hide `task_context` when lowering body Fixes https://github.com/rust-lang/rust/issues/70594
2020-04-03Rollup merge of #70576 - Rustin-Liu:rustin-patch-link-cfg, r=varkorMazdak Farrokhzad-1/+1
Update the description of the ticket to point at RFC 1721 Fixes #70538. My first PR to rust. So please let me know if I'm doing something wrong.
2020-04-03Add regression test for #70673Oliver Scherer-0/+12
2020-04-04Update the description of link_cfg unstableRustin-Liu-1/+1
Fmt code Update tests Modify msg Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
2020-04-03Add test for #59023DutchGhost-0/+17
2020-04-03def_collector, visit_fn: account for no bodyMazdak Farrokhzad-0/+85
2020-04-03Rollup merge of #70725 - Centril:nix-unwraps, r=estebankDylan DPC-0/+51
Avoid `.unwrap()`s on `.span_to_snippet(...)`s First commit fixes https://github.com/rust-lang/rust/issues/70724 and the others fix similar issues found by grepping. r? @estebank
2020-04-03Rollup merge of #70696 - jumbatm:extend-issue-69020-test, r=RalfJungDylan DPC-93/+184
Extend #69020 test to include reversed operand order. Make sure we still emit if a lint if the generic argument comes first. See https://github.com/rust-lang/rust/pull/70566#issuecomment-607671340. r? @RalfJung
2020-04-03Auto merge of #70582 - pnkfelix:update-llvm-to-fix-69841, r=cuviperbors-0/+30
Fix #69841 by updating LLVM submodule. Fix #69841 by updating LLVM submodule. Includes regression test for issue 69841.
2020-04-03Auto merge of #70642 - eddyb:remap-sysroot-src, r=Mark-Simulacrumbors-582/+229
Translate the virtual `/rustc/$hash` prefix back to a real directory. Closes #53486 and fixes #53081, by undoing the remapping to `/rustc/$hash` on the fly, when appropriate (e.g. our testsuites, or user crates that depend on `libstd`), but not during the Rust build itself (as that could leak the absolute build directory into the artifacts, breaking deterministic builds). Tested locally by setting `remap-debuginfo = true` in `config.toml`, which without these changes, was causing 56 tests to fail (see https://github.com/rust-lang/rust/issues/53081#issuecomment-606703215 for more details). cc @Mark-Simulacrum @alexcrichton @ehuss
2020-04-03add_type_neq_err_label: don't .unwrapMazdak Farrokhzad-0/+51