| Age | Commit message (Collapse) | Author | Lines |
|
Add a regression test for #64173 and #66152
Closes #64173
Closes #66152
Mixed the code as the root cause seems the same.
|
|
Looks like they were in FxHash order before, so it might just be luck that this used to be consistent across different word lengths.
|
|
generalize "incoherent impls" impl for user defined types
To allow the move of `trait Error` into core.
continues the work from #94963, finishes https://github.com/rust-lang/compiler-team/issues/487
r? `@petrochenkov` cc `@yaahc`
|
|
|
|
|
|
Also rename the test files for the unused_macros lint to avoid confusion.
The test files now follow a <lint_name><-maybe-decl>.rs scheme.
|
|
Rollup of 7 pull requests
Successful merges:
- #95359 (Update `int_roundings` methods from feedback)
- #95843 (Improve Rc::new_cyclic and Arc::new_cyclic documentation)
- #96507 (Suggest calling `Self::associated_function()`)
- #96635 (Use "strict" mode in JS scripts)
- #96673 (Report that opaque types are not allowed in impls even in the presence of other errors)
- #96682 (Show invisible delimeters (within comments) when pretty printing.)
- #96714 (interpret/validity: debug-check ScalarPair layout information)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
Show invisible delimeters (within comments) when pretty printing.
Because invisible syntax is really hard to work with!
r? `@petrochenkov`
|
|
Report that opaque types are not allowed in impls even in the presence of other errors
fixes #96569
before this PR those useful errors were hidden because either `unused parameter` or `only traits defined in the current crate can be implemented for arbitrary types` got emitted first.
|
|
Suggest calling `Self::associated_function()`
closes #96453
|
|
|
|
Add a new Rust attribute to support embedding debugger visualizers
Implemented [this RFC](https://github.com/rust-lang/rfcs/pull/3191) to add support for embedding debugger visualizers into a PDB.
Added a new attribute `#[debugger_visualizer]` and updated the `CrateMetadata` to store debugger visualizers for crate dependencies.
RFC: https://github.com/rust-lang/rfcs/pull/3191
|
|
|
|
|
|
|
|
|
|
|
|
|
|
do not suggest when trait_ref is some
Update compiler/rustc_resolve/src/late/diagnostics.rs
Co-authored-by: lcnr <rust@lcnr.de>
use helper struct
add a test for functions with some params
refactor debug log
|
|
Rollup of 7 pull requests
Successful merges:
- #96603 (Enable full revision in const generics ui tests)
- #96616 (Relax memory ordering used in `min_stack`)
- #96619 (Relax memory ordering used in SameMutexCheck)
- #96628 (Stabilize `bool::then_some`)
- #96658 (Move callback to the () => {} syntax.)
- #96677 (Add more tests for label-break-value)
- #96697 (Enable tracing for all queries)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Add more tests for label-break-value
Helps with https://github.com/rust-lang/rust/issues/48594. The tests are adapted from https://github.com/rust-lang/rust/issues/48594#issuecomment-421625182.
|
|
Enable full revision in const generics ui tests
The ICEs no longer occur since https://github.com/rust-lang/rust/pull/95776 so the revisions can be reenabled
Also adds some regression tests for issues that no longer ICE because of it
closes #77357
closes #78180
closes #83993
|
|
Revert "Prefer projection candidates instead of param_env candidates for Sized predicates"
Fixes #93262
Reopens #89352
This was a hack that seemed to have no negative side-effects at the time. Given that the latter has a workaround and likely less common than the former, it makes sense to revert this change.
r? `@compiler-errors`
|
|
Overhaul `MacArgs`
Motivation:
- Clarify some code that I found hard to understand.
- Eliminate one use of three places where `TokenKind::Interpolated` values are created.
r? `@petrochenkov`
|
|
The value in `MacArgs::Eq` is currently represented as a `Token`.
Because of `TokenKind::Interpolated`, `Token` can be either a token or
an arbitrary AST fragment. In practice, a `MacArgs::Eq` starts out as a
literal or macro call AST fragment, and then is later lowered to a
literal token. But this is very non-obvious. `Token` is a much more
general type than what is needed.
This commit restricts things, by introducing a new type `MacArgsEqKind`
that is either an AST expression (pre-lowering) or an AST literal
(post-lowering). The downside is that the code is a bit more verbose in
a few places. The benefit is that makes it much clearer what the
possibilities are (though also shorter in some other places). Also, it
removes one use of `TokenKind::Interpolated`, taking us a step closer to
removing that variant, which will let us make `Token` impl `Copy` and
remove many "handle Interpolated" code paths in the parser.
Things to note:
- Error messages have improved. Messages like this:
```
unexpected token: `"bug" + "found"`
```
now say "unexpected expression", which makes more sense. Although
arbitrary expressions can exist within tokens thanks to
`TokenKind::Interpolated`, that's not obvious to anyone who doesn't
know compiler internals.
- In `parse_mac_args_common`, we no longer need to collect tokens for
the value expression.
|
|
|
|
|
|
Fix constants not getting dropped if part of a diverging expression
fixes https://github.com/rust-lang/rust/issues/90762
cc `@RalfJung`
|
|
To limit the fallout from this, don't do this for the last (or only) operand in an rvalue.
|
|
Add some TAIT-related tests
Closes #53398
Closes #58662
Closes #89952
Closes #94429
r? `@oli-obk` as you're familiar with it
|
|
Quick fix for #96223.
This PR is a quick fix regarding #96223.
As mentioned in the issue, others modification could be added to not elide types with bound vars from suggestions.
Special thanks to ``@jackh726`` for mentoring and ``@Manishearth`` for minimal test case.
r? ``@jackh726``
|
|
|
|
for Sized predicates
|
|
When suggesting to import an item, also suggest changing the path if appropriate
When we don't find an item we search all of them for an appropriate
import and suggest `use`ing it. This is sometimes done for expressions
that have paths with more than one segment. We now also suggest changing
that path to work with the `use`.
Fix #95413
|
|
|
|
|
|
Fix unit struct/enum variant in destructuring assignment
See https://github.com/rust-lang/rfcs/blob/master/text/2909-destructuring-assignment.md#guide-level-explanation, "including **unit** and tuple structs"
Fixes #94319
|
|
|
|
|
|
|
|
embedding debugger visualizers into a generated PDB.
Cleanup `DebuggerVisualizerFile` type and other minor cleanup of queries.
Merge the queries for debugger visualizers into a single query.
Revert move of `resolve_path` to `rustc_builtin_macros`. Update dependencies in Cargo.toml for `rustc_passes`.
Respond to PR comments. Load visualizer files into opaque bytes `Vec<u8>`. Debugger visualizers for dynamically linked crates should not be embedded in the current crate.
Update the unstable book with the new feature. Add the tracking issue for the debugger_visualizer feature.
Respond to PR comments and minor cleanups.
|
|
|
|
other errors
|
|
|
|
Mitigate impact of subtle invalid call suggestion logic
There's some subtle interaction between inferred expressions being
passed as an argument to fn calls with fewer than expected arguments. To
avoid the ICE, I'm changing indexing operations with `.get(idx)`, but
the underlying logic still needs to be audited as it was written with
the assumption that `final_arg_types` and `provided_args` have the right
length.
Address #96638.
|
|
ken-matsui:fix-invalid-keyword-order-for-function-declarations, r=davidtwco
Fix invalid keyword order for function declarations
Closes: https://github.com/rust-lang/rust/issues/94879
|
|
Add a regression test for #92305
Closes #92305
r? ``@oli-obk`` as per https://github.com/rust-lang/rust/issues/92305#issuecomment-1114043188
|
|
Use source callsite in check_argument_types suggestion
This makes the "remove extra arguement" suggestion valid when the function argument is a macro.
Additionally, this may fix #96225, but the only way I can reproduce that issue is using the playground, so we will need to wait until after this is merged to ensure it's fixed.
|
|
|