about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-05-30Rollup merge of #97172 - SparrowLii:unsafe_extern, r=compiler-errorsMichael Goulet-6/+37
Optimize the diagnostic generation for `extern unsafe` This PR does the following about diagnostic generation when parsing foreign mod: 1. Fixes the FIXME about avoiding depending on the error message text. 2. Continue parsing when `unsafe` is followed by `{` (just like `unsafe extern {...}`). 3. Add test case.
2022-05-30Auto merge of #97357 - ↵bors-37/+15
davidtwco:diagnostic-translation-typed-subdiagnostic-simplification, r=oli-obk errors: simplify referring to fluent attributes To render the message of a Fluent attribute, the identifier of the Fluent message must be known. `DiagnosticMessage::FluentIdentifier` contains both the message's identifier and optionally the identifier of an attribute. Generated constants for each attribute would therefore need to be named uniquely (amongst all error messages) or be able to refer to only the attribute identifier which will be combined with a message identifier later. In this commit, the latter strategy is implemented as part of the `Diagnostic` type's functions for adding subdiagnostics of various kinds. r? `@oli-obk`
2022-05-30address commentsMichael Goulet-20/+86
2022-05-30better enum suggestionsMichael Goulet-0/+151
2022-05-30Auto merge of #97025 - ouz-a:mini-derefer-generator, r=davidtwcobors-3/+219
Add validation layer for Derefer _Follow up work to #96549 #96116 #95857 #95649_ This adds validation for Derefer making sure it is always the first projection. r? rust-lang/mir-opt
2022-05-30add regression testMichael Goulet-0/+41
2022-05-30fix typoMichael Goulet-29/+29
2022-05-30validate derefer, run derefer inside generatorouz-a-3/+219
2022-05-30Add line number click GUI testGuillaume Gomez-1/+11
2022-05-30Improve source-code-page.goml GUI test codeGuillaume Gomez-3/+3
2022-05-30Add test for known-bugs of cfg_accessibleUrgau-6/+46
2022-05-30Add tests for private items of cfg_accessibleUrgau-0/+21
2022-05-30Add tests for "not sure" case of cfg_accessibleUrgau-0/+303
2022-05-30Handle more cases in cfg_accessibleUrgau-41/+42
2022-05-30Add GUI test for `<details>`/`<summary>` displayGuillaume Gomez-0/+35
2022-05-30normalize forbidden slicesMaybe Waffle-78/+79
2022-05-30errors: simplify referring to fluent attributesDavid Wood-37/+15
To render the message of a Fluent attribute, the identifier of the Fluent message must be known. `DiagnosticMessage::FluentIdentifier` contains both the message's identifier and optionally the identifier of an attribute. Generated constants for each attribute would therefore need to be named uniquely (amongst all error messages) or be able to refer to only the attribute identifier which will be combined with a message identifier later. In this commit, the latter strategy is implemented as part of the `Diagnostic` type's functions for adding subdiagnostics of various kinds. Signed-off-by: David Wood <david.wood@huawei.com>
2022-05-30Rollup merge of #97531 - compiler-errors:for-loop-pat-mismatch, r=davidtwcoDylan DPC-0/+43
Note pattern mismatch coming from `for` loop desugaring Fixes #97163
2022-05-30Rollup merge of #97504 - JohnTitor:cleanup-deps, r=davidtwcoDylan DPC-0/+37
Ensure source file present when calculating max line number Resubmission of #89268, fixes #71363 The behavior difference of `simulate-remapped-rust-src-base` is not something we should take into account here, so limiting targets to run the test makes sense, I think. r? `@davidtwco,` and `@estebank,` you might be interested in this change
2022-05-30test forbidden slices on all two usizesizesMaybe Waffle-28/+309
2022-05-30--blessMaybe Waffle-28/+28
2022-05-30Use `// error-pattern:` header in `forbidden_slices.rs` testMaybe Waffle-0/+1
2022-05-30Rename slice_from_ptr_range_const -> const_slice_from_ptr_rangeMaybe Waffle-2/+2
This is in line with other `const fn` features.
2022-05-30Add ui tests for `slice::from_{ptr_range,raw_parts}`Maybe Waffle-0/+481
2022-05-30Add GUI test for settings displayGuillaume Gomez-0/+60
2022-05-30Auto merge of #96964 - oli-obk:const_trait_mvp, r=compiler-errorsbors-142/+34
Replace `#[default_method_body_is_const]` with `#[const_trait]` pulled out of #96077 related issues: #67792 and #92158 cc `@fee1-dead` This is groundwork to only allowing `impl const Trait` for traits that are marked with `#[const_trait]`. This is necessary to prevent adding a new default method from becoming a breaking change (as it could be a non-const fn).
2022-05-30Remove `#[default..]` and add `#[const_trait]`Deadbeef-142/+34
2022-05-30Optimize the diagnostic generation for `extern unsafe`SparrowLii-6/+37
2022-05-30Bless tests with the full list of conventions in the outputScott McMurray-2/+2
2022-05-30Add support for emitting functions with `coldcc` in LLVMScott McMurray-0/+103
The eventual goal is to try using this for things like the internal panicking stuff, to see whether it helps.
2022-05-30Auto merge of #97489 - GuillaumeGomez:settings-js-disabled, r=notriddlebors-0/+6
Add sentence in case JS is disabled on settings.html page Instead of having an empty page, it'll look like this: ![Screenshot from 2022-05-28 17-46-23](https://user-images.githubusercontent.com/3050060/170833333-e1a59c2b-27ca-47da-9c08-2356e4a689cb.png) r? `@notriddle`
2022-05-29Rollup merge of #97493 - compiler-errors:issue-97490, r=oli-obkMichael Goulet-0/+12
Use `type_is_copy_modulo_regions` check in intrisicck This one canoncalizes region variables correctly, preventing an ICE Fixes #97490
2022-05-29Add `let_underscore_drop` lint.Aaron Kofsky-0/+25
This lint checks for statements similar to `let _ = foo`, where `foo` is a type that implements `Drop`. These types of let statements cause the expression in them to be dropped immediately, instead of at the end of the scope. Such behavior can be surprizing, especially if you are relying on the value to be dropped at the end of the scope. Instead, the binding should be an underscore prefixed name (like `_unused`) or the value should explicitly be passed to `std::mem::drop()` if the value really should be dropped immediately.
2022-05-29Use type_is_copy_modulo_regions check in intrisicckMichael Goulet-0/+12
2022-05-29Note pattern mismatch coming from for-loop desugaringMichael Goulet-0/+43
2022-05-29Auto merge of #94214 - nikic:rust-opaque-pointers, r=cuviperbors-285/+252
Prepare Rust for opaque pointers Fix one codegen bug with opaque pointers, and update our IR tests to accept both typed pointer and opaque pointer IR. This is a bit annoying, but unavoidable if we want decent test coverage on both LLVM 14 and LLVM 15. This prepares Rust for when LLVM will enable opaque pointers by default.
2022-05-29Auto merge of #97456 - Bryysen:issue-97319-fix, r=compiler-errorsbors-60/+139
Improve error message for E0081 Closes #97319
2022-05-29Rebase fallout.Camille GILLOT-1/+1
2022-05-29Handle anonymous lifetimes properly in diagnostics.Camille GILLOT-2/+2
2022-05-29Fortify check for number of generic parameters.Camille GILLOT-4/+2
2022-05-29Make lifetime errors more precise in the presence of `Fresh` lifetimes.Camille GILLOT-20/+380
2022-05-29Auto merge of #97287 - compiler-errors:type-interner, r=jackh726,oli-obkbors-88/+120
Move things to `rustc_type_ir` Finishes some work proposed in https://github.com/rust-lang/compiler-team/issues/341. r? `@ghost`
2022-05-29Harden bad placeholder checks on statics/constsYuki Okushi-7/+74
Co-authored-by: Fabian Wolff <fabian.wolff@alumni.ethz.ch>
2022-05-29Auto merge of #96652 - notriddle:notriddle/self, r=GuillaumeGomezbors-0/+92
rustdoc: include impl generics / self in search index Fixes #92205
2022-05-29Ensure source file present when calculating max line numberYuki Okushi-0/+37
Co-authored-by: Ross MacArthur <ross@macarthur.io>
2022-05-29Rollup merge of #97479 - JohnTitor:make-check-pass, r=compiler-errorsGuillaume Gomez-13/+11
Make some tests check-pass This touches the tests related to lint, parser, and importing, all of them should be fine with `check-pass`. r? ``@compiler-errors``
2022-05-29Rollup merge of #97028 - ridwanabdillahi:pretty-printer, r=michaelwoeristerGuillaume Gomez-81/+242
Add support for embedding pretty printers via `#[debugger_visualizer]` attribute Initial support for [RFC 3191](https://github.com/rust-lang/rfcs/pull/3191) in PR https://github.com/rust-lang/rust/pull/91779 was scoped to supporting embedding NatVis files using a new attribute. This PR implements the pretty printer support as stated in the RFC mentioned above. This change includes embedding pretty printers in the `.debug_gdb_scripts` just as the pretty printers for rustc are embedded today. Also added additional tests for embedded pretty printers. Additionally cleaned up error checking so all error checking is done up front regardless of the current target. RFC: https://github.com/rust-lang/rfcs/pull/3191
2022-05-29Rollup merge of #96950 - JohnTitor:issue-96395, r=compiler-errors,oli-obkGuillaume Gomez-0/+3
Add regression test for #96395 Closes #96395 This repeats "fixed" and "ICE", see https://github.com/rust-lang/glacier/pull/1243#issuecomment-1123768138 I think it's good to add a test before regressing again. r? ``@compiler-errors`` for quick reviiew cc ``@oli-obk`` you might want to check as you're familiar with MIR
2022-05-28Move some tests to more reasonable placesCaio-0/+0
2022-05-28Add E0788 for improper #[no_coverage] usageltdk-0/+129