about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2021-12-07Correct test which wasn't failing correctlyAndy Wang-4/+4
2021-12-06Provide .dwo paths to llvm-dwp explicitlyAndy Wang-2/+2
2021-12-05Apply path remapping to DW_AT_GNU_dwo_nameAndy Wang-1/+10
2021-12-04Rollup merge of #90519 - estebank:issue-84003, r=petrochenkovMatthias Krüger-16/+287
Keep spans for generics in `#[derive(_)]` desugaring Keep the spans for generics coming from a `derive`d Item, so that errors and suggestions have better detail. Fix #84003.
2021-12-04Rollup merge of #89701 - tom7980:issue-89566-fix, r=petrochenkovMatthias Krüger-7/+183
Updated error message for accidental uses of derive attribute as a crate attribute This partially fixes the original issue #89566 by adding derive to the list of invalid crate attributes and then providing an updated error message however I'm not sure how to prevent the resolution error message from emitting without causing the compiler to just abort when it finds an invalid crate attribute (which I'd prefer not to do so we can find and emit other errors). `@petrochenkov` I have been told you may have some insight on why it's emitting the resolution error though honestly I'm not sure if we need to worry about fixing it as long as we can provide the invalid crate attribute error also (which happens first anyway)
2021-12-04Auto merge of #88439 - cynecx:unwind_asm, r=Amanieubors-44/+174
Unwinding support for inline assembly r? `@Amanieu`
2021-12-04Rollup merge of #91488 - compiler-errors:issue-91477, r=estebankMatthias Krüger-0/+16
Fix ICE when `yield`ing in function returning `impl Trait` Change an assert to a `delay_span_bug` and remove an unwrap, that should fix it. Fixes #91477
2021-12-04Rollup merge of #91478 - estebank:fix-newline-in-cast-suggestion, r=camelidMatthias Krüger-10/+10
Remove incorrect newline from float cast suggestion
2021-12-04Rollup merge of #91385 - ecstatic-morse:pat-param-spec-suggest, r=estebankMatthias Krüger-6/+18
Suggest the `pat_param` specifier before `|` on 2021 edition Ran into this today after writing some Rust for the first time in a while. r? `@estebank`
2021-12-04Rollup merge of #91209 - camelid:snapshot, r=jyn514Matthias Krüger-10/+10
Implement `@snapshot` check for htmldocck This form of check allows performing snapshot tests (à la `src/test/ui`) on rustdoc HTML output, making it easier to create and update tests. See [this Zulip thread][1] for more information about the motivation for this change. [1]: https://zulip-archive.rust-lang.org/stream/266220-rustdoc/topic/HTML.20snapshot.20tests.html#262651142 r? `@GuillaumeGomez`
2021-12-03limit may_unwind codegen test to x86_64cynecx-0/+1
2021-12-03fix feature-gate test for may_unwindcynecx-1/+3
2021-12-03fix inline asm test by not hardcoding symbol namescynecx-6/+18
2021-12-03fix inline asm test because of missing attributecynecx-1/+1
2021-12-03add clobber_abi("C") to may_unwind inline-asm testscynecx-2/+2
2021-12-03add tests for asm's options(may_unwind)cynecx-0/+95
2021-12-03add `unwind_asm` feature gate for `may_unwind` optioncynecx-0/+20
2021-12-03Add initial AST and MIR support for unwinding from inline assemblyAmanieu d'Antras-44/+44
2021-12-03Auto merge of #90737 - eholk:intofuture, r=tmandrybors-4/+74
Reintroduce `into_future` in `.await` desugaring This is a reintroduction of the remaining parts from https://github.com/rust-lang/rust/pull/65244 that have not been relanded yet. This isn't quite ready to merge yet. The last attempt was reverting due to performance regressions, so we need to make sure this does not introduce those issues again. Issues #67644, #67982 /cc `@yoshuawuyts`
2021-12-03Annotate `derive`d spans and move span suggestion codeEsteban Kuber-2/+2
* Annotate `derive`d spans from the user's code with the appropciate context * Add `Span::can_be_used_for_suggestion` to query if the underlying span at the users' code
2021-12-03Modify `bounds_span` to ignore bounds coming from a `derive` macroEsteban Kuber-12/+12
2021-12-03Keep spans for generics in `#[derive(_)]` desugaringEsteban Kuber-16/+287
Keep the spans for generics coming from a `derive`d Item, so that errors and suggestions have better detail. Fix #84003.
2021-12-03Update invalid crate attributes, add help messageTom Farmer-7/+183
tidy run update invalid crate attributes, improve error update test outputs de-capitalise error update tests Update invalid crate attributes, add help message Update - generate span without using BytePos Add correct dependancies Update - generate suggestion without BytePos Tidy run update tests Generate Suggestion without BytePos Add all builtin attributes add err builtin inner attr at top of crate fix tests add err builtin inner attr at top of crate tidy fix add err builtin inner attr at top of crate
2021-12-03Revert "Auto merge of #91354 - fee1-dead:const_env, r=spastorino"Santiago Pastorino-4/+5
This reverts commit 18bb8c61a975fff6424cda831ace5b0404277145, reversing changes made to d9baa361902b172be716f96619b909f340802dea.
2021-12-02Fix ICE when yielding in fn returning impl TraitMichael Goulet-0/+16
2021-12-03Rollup merge of #91462 - b-naber:use-try-normalize-erasing-regions, r=jackh726Matthias Krüger-0/+50
Use try_normalize_erasing_regions in needs_drop Fixes https://github.com/rust-lang/rust/issues/81199 r? ``@jackh726``
2021-12-03Rollup merge of #91273 - Badel2:ice-index-str, r=estebankMatthias Krüger-0/+59
Fix ICE #91268 by checking that the snippet ends with a `)` Fix #91268 Previously it was assumed that the last character of `snippet` will be a `)`, so using `snippet.len() - 1` as an index should be safe. However as we see in the test, it is possible to enter that branch without a closing `)`, and it will trigger the panic if the last character happens to be multibyte. The fix is to ensure that the snippet ends with `)`, and skip the suggestion otherwise.
2021-12-03Rollup merge of #90854 - sanxiyn:unsized-and-uninhabited, r=estebankMatthias Krüger-0/+21
Type can be unsized and uninhabited Fix #88150.
2021-12-03Remove incorrect newline from float cast suggestionEsteban Kuber-10/+10
2021-12-02Update .stderr filesEric Holk-0/+3
2021-12-02use try_normalize_erasing_regions in needs_dropb-naber-0/+50
2021-12-02Rollup merge of #91457 - steffahn:additional_test_from_91068, r=jackh726Matthias Krüger-0/+22
Add additional test from rust issue number 91068 see rust-lang/rust#91068 r? ``@jackh726``
2021-12-02Rollup merge of #91435 - FabianWolff:issue-91421-if-then, r=lcnrMatthias Krüger-1/+36
Improve diagnostic for missing half of binary operator in `if` condition Fixes #91421. I've also changed it so that it doesn't consume the `else` token in the error case, because it will try to consume it again afterwards, leading to this incorrect error message (where the `else` reported as missing is actually there): ``` error: expected one of `.`, `;`, `?`, `else`, or an operator, found `{` --> src/main.rs:4:12 | 4 | } else { 4 }; | ^ expected one of `.`, `;`, `?`, `else`, or an operator ``` r? `@lcnr`
2021-12-02Rollup merge of #91410 - ecstatic-morse:const-precise-live-drops-take-2, ↵Matthias Krüger-8/+34
r=oli-obk Move `#![feature(const_precise_live_drops)]` checks earlier in the pipeline Should mitigate the issues found during MCP on #73255. Once this is done, we should clean up the queries a bit, since I think `mir_drops_elaborated_and_const_checked` can be merged back into `mir_promoted`. Fixes #90770. cc ``@rust-lang/wg-const-eval`` r? ``@nikomatsakis`` (since they reviewed #71824)
2021-12-02Rollup merge of #91364 - FabianWolff:issue-91210-ptr-field, r=oli-obkMatthias Krüger-0/+41
Improve error message for incorrect field accesses through raw pointers Fixes #91210.
2021-12-02Rollup merge of #91329 - Aaron1011:modulo-regions-test, r=jackh726Matthias Krüger-0/+77
Fix incorrect usage of `EvaluatedToOk` when evaluating `TypeOutlives` A global predicate is not guarnatenteed to outlive all regions. If the predicate involves late-bound regions, then it may fail to outlive other regions (e.g. `for<'b> &'b bool: 'static` does not hold) We now only produce `EvaluatedToOk` when a global predicate has no late-bound regions - in that case, the ony region that can be present in the type is 'static
2021-12-02Rollup merge of #91321 - matthewjasper:constaint-placeholders, r=jackh726Matthias Krüger-0/+19
Handle placeholder regions in NLL type outlive constraints Closes #76168
2021-12-02Rollup merge of #89954 - GuillaumeGomez:legacy-const-generic-doc, r=AmanieuMatthias Krüger-0/+16
Fix legacy_const_generic doc arguments display Fixes https://github.com/rust-lang/rust/issues/83167. cc ``@Amanieu``
2021-12-02Code review feedbackEric Holk-4/+9
Add a note about `IntoFuture` in error messages where T is not a future. Change await-into-future.rs to be a run-pass test.
2021-12-02Change to check-passJack Huey-1/+1
2021-12-02Add additional test from rust issue number 91068Frank Steffahn-0/+22
2021-12-02Auto merge of #91455 - matthiaskrgr:rollup-gix2hy6, r=matthiaskrgrbors-49/+123
Rollup of 4 iffy pull requests Successful merges: - #89234 (Disallow non-c-like but "fieldless" ADTs from being casted to integer if they use arbitrary enum discriminant) - #91045 (Issue 90702 fix: Stop treating some crate loading failures as fatal errors) - #91394 (Bump stage0 compiler) - #91411 (Enable svh tests on msvc) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-12-02Rollup merge of #91411 - ChrisDenton:valid-paths, r=petrochenkovMatthias Krüger-24/+8
Enable svh tests on msvc These tests were ignored for msvc in #30778 because of additional notes that were being added for some reason. I'm fairly confident this has been fixed in the intervening years so lets try re-enabling these tests. Fixes #31306
2021-12-02Rollup merge of #91045 - mjptree:issue-90702-fix, r=petrochenkovMatthias Krüger-12/+93
Issue 90702 fix: Stop treating some crate loading failures as fatal errors Surface mulitple `extern crate` resolution errors at a time. This is achieved by creating a dummy crate, instead of aborting directly after the resolution error. The `ExternCrateError` has been added to allow propagating the resolution error from `rustc_metadata` crate to the `rustc_resolve` with a minimal public surface. The `import_extern_crate` function is a block that was factored out from `build_reduced_graph_for_item` for better organization. The only added functionality made to it where the added error handling in the `process_extern_crate` call. The remaining bits in this function are the same as before. Resolves #90702 r? `@petrochenkov`
2021-12-02Rollup merge of #89234 - nbdd0121:discr, r=jackh726Matthias Krüger-13/+22
Disallow non-c-like but "fieldless" ADTs from being casted to integer if they use arbitrary enum discriminant Code like ```rust #[repr(u8)] enum Enum { Foo /* = 0 */, Bar(), Baz{} } let x = Enum::Bar() as u8; ``` seems to be unintentionally allowed so we couldn't disallow them now ~~, but we could disallow them if arbitrary enum discriminant is used before 1.56 hits stable~~ (stabilization was reverted). Related: #88621 `@rustbot` label +T-lang
2021-12-02Auto merge of #91354 - fee1-dead:const_env, r=spastorinobors-5/+4
Cleanup: Eliminate ConstnessAnd This is almost a behaviour-free change and purely a refactoring. "almost" because we appear to be using the wrong ParamEnv somewhere already, and this is now exposed by failing a test using the unstable `~const` feature. We most definitely need to review all `without_const` and at some point should probably get rid of many of them by using `TraitPredicate` instead of `TraitRef`. This is a continuation of https://github.com/rust-lang/rust/pull/90274. r? `@oli-obk` cc `@spastorino` `@ecstatic-morse`
2021-12-02Add test for legacy-const-generic argumentsGuillaume Gomez-0/+16
2021-12-02Auto merge of #91291 - GuillaumeGomez:const-deref-method, r=camelidbors-0/+38
Fix const deref methods display Fixes https://github.com/rust-lang/rust/issues/90855 (more information in the issue). r? `@camelid`
2021-12-02Auto merge of #91003 - psumbera:sparc64-abi, r=nagisabors-1/+121
fix sparc64 ABI for aggregates with floating point members Fixes #86163
2021-12-01Auto merge of #90446 - cjgillot:late-elided, r=jackh726bors-46/+178
Lint elided lifetimes in path during lifetime resolution. The lifetime elision lint is known to be brittle and can be redundant with later lifetime resolution errors. This PR aims to remove the redundancy by performing the lint after lifetime resolution. This PR proposes to carry the information that an elision should be linted against by using a special `LifetimeName`. I am not certain this is the best solution, but it is certainly the easiest. Fixes https://github.com/rust-lang/rust/issues/60199 Fixes https://github.com/rust-lang/rust/issues/55768 Fixes https://github.com/rust-lang/rust/issues/63110 Fixes https://github.com/rust-lang/rust/issues/71957