about summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2020-07-26Remove explicit `extern crate` from proc-macro testAaron Hill-3/+1
We only want to load this auxiliary crate from a proc-macro, so that it only ever needs to get built for the host platform.
2020-07-26Add test for serializing hygiene *into* a proc-macro crateAaron Hill-12/+61
This is a very obscure corner case, and should never be hit in practice.
2020-07-26Add test for use of $crate in nested foreign macro_rules!Aaron Hill-0/+23
2020-07-26Hygiene serialization implementationAaron Hill-117/+149
2020-07-26Auto merge of #74708 - kanru:issue-74564, r=davidtwcobors-0/+10419
Ensure stack when type checking and building MIR for large if expressions Fixes #74564
2020-07-26report kind of deprecated item in messageAndy Russell-733/+733
This is important for fields, which are incorrectly referred to as "items".
2020-07-26Fix #[track_caller] shims for trait objects.Adam Perry-0/+23
We were missing an Instance::resolve_for_fn_ptr in resolve_for_vtable. Closes #74764.
2020-07-26Bless youOliver Scherer-4/+4
2020-07-26Remove more obsolete test flagsOliver Scherer-6/+0
2020-07-26Add test for issue-72911Yuki Okushi-0/+56
2020-07-26Add test for issue-56445Yuki Okushi-0/+32
2020-07-26check that even referencing a TLS static during CTFE failsRalf Jung-1/+19
2020-07-26Auto merge of #74060 - kpp:remove_length_at_most_32, r=dtolnaybors-567/+215
Remove trait LengthAtMost32 This is a continuation of https://github.com/rust-lang/rust/pull/74026 preserving the original burrbull's commit. I talked to @burrbull, he suggested me to finish his PR.
2020-07-26Auto merge of #74735 - Aaron1011:fix/wf-impl-self-type, r=estebankbors-8/+31
Use the proper span when WF-checking an impl self type
2020-07-25Auto merge of #74670 - tmandry:issue-73818, r=matthewjasperbors-0/+25
Normalize bounds fully when checking defaulted types When checking that the default type for `<T as X>::Y` is valid in this example: ``` trait X { type Y: PartialEq<<Self as X>::Y> } impl X for T { default type Y = S; } ``` We will have to prove the bound `S: PartialEq<<T as X>::Y>`. In this case we want `<T as X>::Y` to normalize to `S`. This is valid because we are checking the default value specifically here. Add `<T as X>::Y = S` to the ParamEnv for normalization _of the bound we are checking_ only. Fixes #73818. --- I noticed that adding this to the env for bounds checking didn't break any tests. Not sure if this is because we can't rely on it to prove anything, or because of missing test coverage. r? @matthewjasper, @nikomatsakis
2020-07-25Fix diagnostic by using predicate in GATs tooTyler Mandry-22/+4
2020-07-25Remove manual normalization in compare_projection_boundsTyler Mandry-4/+22
2020-07-25Auto merge of #74687 - estebank:bracketless-turbofish, r=matthewjasperbors-0/+56
Detect turbofish missing surrounding angle brackets Fix #74065.
2020-07-25Clean up some uses of logging in ui testsOliver Scherer-18/+8
2020-07-25Ensure stack when type checking and building MIR for large if expressionsKan-Ru Chen-0/+10419
2020-07-25Fix commas.Steven Malis-1/+1
2020-07-25Use the proper span when WF-checking an impl self typeAaron Hill-8/+31
2020-07-24Rollup merge of #74698 - ayrtonm:handle-traitref-mismatch, r=estebankManish Goregaokar-0/+30
fixed error reporting for mismatched traits mismatched traits were previously referred to as types closes #72217
2020-07-24Rollup merge of #74491 - xldenis:constant-binop-opt, r=oli-obkManish Goregaokar-3/+4
Optimize away BitAnd and BitOr when possible This PR lets `const_prop` optimize away `a | true == true` , `a & false == false` and `a * 0 = 0`. While I was writing this I've realized that constant propagation misses a lot of opportunities. For example: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=2a4b45e772f214210a36749b27223bb0 Constant propagation doesn't seem to... propagate constants, additionally the way constant propagation is currently setup makes it tricky to add cases like `a | false == a`. I tried to organize `eval_rvalue_with_identities` to make the pattern of the optimizations easier to see but it still obscurs what should be a simple peephole optmization. cc @oli-obk
2020-07-24Auto merge of #74676 - lcnr:generics-no-sort, r=varkorbors-2/+34
correctly deal with unsorted generic parameters We now stop sorting generic params and instead correctly handle unsorted params in the rest of the compiler. We still restrict const params to come after type params though, so this PR does not change anything which is visible to users. This might slightly influence perf, so let's prevent any unintentional rollups. @bors rollup=never r? @varkor
2020-07-24Rollup merge of #74703 - tmandry:issue-74047, r=oli-obkYuki Okushi-0/+29
Fix ICE while building MIR with type errors See https://github.com/rust-lang/rust/issues/74047#issuecomment-663290913 for background. Replacing a binding with `PatKind::Wild` (introduced in #51789 and later refactored in #67439) caused an ICE downstream while building MIR. I noticed that taking this code out no longer triggers the ICEs it was added to prevent. I'm not sure what else changed, or if this change is _correct_, but it does seem to be passing ui tests at least. r? @oli-obk cc @estebank Fixes #74047.
2020-07-24Rollup merge of #74680 - JohnTitor:missing-backticks, r=lcnrYuki Okushi-13/+13
Add missing backticks in diagnostics note
2020-07-24Rollup merge of #74665 - smmalis37:issue-62200, r=davidtwcoYuki Okushi-0/+26
Don't ICE on unconstrained anonymous lifetimes inside associated types. Fixes #62200. The change here is inspired (copied) by how this case is handled on bare fns at https://github.com/rust-lang/rust/blob/e8b55a4ad230ebec762fdfc4f241ba98a98560af/src/librustc_typeck/astconv.rs#L3083-L3106.
2020-07-24Rollup merge of #74623 - lcnr:polymorphize-functions, r=eddybYuki Okushi-0/+13
polymorphize GlobalAlloc::Function this sadly does not change #74614 r? @eddyb
2020-07-24Rollup merge of #74572 - Mark-Simulacrum:unify-rustc-depr, r=petrochenkovYuki Okushi-3/+3
Internally unify rustc_deprecated and deprecated This PR intentionally tries to be "featureless" in that the behavior is not altered for either attribute, though it more clearly exposes cases where that is the case in the code.
2020-07-23Fix ICE while building MIR with type errorsTyler Mandry-0/+29
Fixes #74047.
2020-07-23added a test case for reporting mismatched traitsAyrton-0/+30
2020-07-23Account for trailing closing angle bracketsEsteban Küber-1/+40
2020-07-23Detect turbofish missing surrounding angle bracketsEsteban Küber-0/+17
2020-07-23Auto merge of #74509 - matthewjasper:empty-verify, r=nikomatsakisbors-0/+101
Use `ReEmpty(U0)` as the implicit region bound in typeck Fixes #74429 r? @nikomatsakis
2020-07-23Add missing backticks in diagnostics noteYuki Okushi-13/+13
2020-07-23test usageBastian Kauschke-2/+15
2020-07-23add more complex param order testBastian Kauschke-1/+20
2020-07-23Auto merge of #74667 - Manishearth:rollup-s6k59sw, r=Manishearthbors-0/+27
Rollup of 8 pull requests Successful merges: - #74141 (libstd/libcore: fix various typos) - #74490 (add a Backtrace::disabled function) - #74548 (one more Path::with_extension example, to demonstrate behavior) - #74587 (Prefer constant over function) - #74606 (Remove Linux workarounds for missing CLOEXEC support) - #74637 (Make str point to primitive page) - #74654 (require type defaults to be after const generic parameters) - #74659 (Improve codegen for unchecked float casts on wasm) Failed merges: r? @ghost
2020-07-23add const genericsBastian Kauschke-0/+11
2020-07-23Normalize bounds fully when checking defaulted typesTyler Mandry-0/+25
2020-07-23Rollup merge of #74654 - lcnr:default-no-more, r=varkorManish Goregaokar-0/+27
require type defaults to be after const generic parameters From current discussions it seems like the goal here is for type and const parameters to be unordered and allow things like `struct Foo<const N: usize, T = u32>(T)` and `struct Foo<T, const N: usize = 7>` this way. Note: This means that using `min_const_generics` it will not be possible for an adt to have both type defaults and const parameters. closes #70471 r? @varkor @eddyb
2020-07-23Auto merge of #74611 - Mark-Simulacrum:revert-74069-bad-niche, r=eddybbors-28/+3
Revert "Compare tagged/niche-filling layout and pick the best one" Reverts rust-lang/rust#74069. It caused a performance regression, see https://github.com/rust-lang/rust/pull/74069#issuecomment-662166827. perf: https://perf.rust-lang.org/compare.html?start=d3df8512d2c2afc6d2e7d8b5b951dd7f2ad77b02&end=cfade73820883adf654fe34fd6b0b03a99458a51 r? @eddyb cc @nnethercote
2020-07-22Include the note in the test.Steven Malis-0/+1
2020-07-23tweak wordingBastian Kauschke-1/+1
Co-authored-by: varkor <github@varkor.com>
2020-07-22Don't ICE on unconstrained anonymous lifetimes inside associated types.Steven Malis-0/+25
2020-07-22Rollup merge of #74618 - JohnTitor:no-more-bad-placeholder, r=estebankManish Goregaokar-6/+14
Do not ICE on assoc type with bad placeholder Fixes #74612 r? @estebank
2020-07-22Rollup merge of #74538 - nbdd0121:issue-73976, r=lcnrManish Goregaokar-0/+102
Guard against non-monomorphized type_id intrinsic call This PR checks whether the type is sufficient monomorphized when calling type_id or type_name intrinsics. If the type is not sufficiently monomorphized, e.g. used in a pattern, the code will be rejected. Fixes #73976
2020-07-22Rollup merge of #73783 - estebank:impl-dyn-trait-static-lifetime, r=nikomatsakisManish Goregaokar-211/+724
Detect when `'static` obligation might come from an `impl` Partly address #71341.
2020-07-22require type defaults to be after const generic parametersBastian Kauschke-0/+27
as if this is currently possible. HA!