| Age | Commit message (Collapse) | Author | Lines |
|
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.
|
|
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`
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>
|
|
Note pattern mismatch coming from `for` loop desugaring
Fixes #97163
|
|
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
|
|
|
|
|
|
|
|
This is in line with other `const fn` features.
|
|
|
|
|
|
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).
|
|
|
|
|
|
|
|
The eventual goal is to try using this for things like the internal panicking stuff, to see whether it helps.
|
|
Add sentence in case JS is disabled on settings.html page
Instead of having an empty page, it'll look like this:

r? `@notriddle`
|
|
Use `type_is_copy_modulo_regions` check in intrisicck
This one canoncalizes region variables correctly, preventing an ICE
Fixes #97490
|
|
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.
|
|
|
|
|
|
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.
|
|
Improve error message for E0081
Closes #97319
|
|
|
|
|
|
|
|
|
|
Move things to `rustc_type_ir`
Finishes some work proposed in https://github.com/rust-lang/compiler-team/issues/341.
r? `@ghost`
|
|
Co-authored-by: Fabian Wolff <fabian.wolff@alumni.ethz.ch>
|
|
rustdoc: include impl generics / self in search index
Fixes #92205
|
|
Co-authored-by: Ross MacArthur <ross@macarthur.io>
|
|
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``
|
|
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
|
|
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
|
|
|
|
|