| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
repr(transparent): it's fine if the one non-1-ZST field is a ZST
This code currently gets rejected:
```rust
#[repr(transparent)]
struct MyType([u16; 0])
```
That clearly seems like a bug to me: `repr(transparent)` [got defined ](https://github.com/rust-lang/rust/issues/77841#issuecomment-716575747) as having any number of 1-ZST fields plus optionally one more field; `MyType` clearly satisfies that definition.
This PR changes the `repr(transparent)` logic to actually match that definition.
|
|
Enable varargs support for AAPCS calling convention
Welp, I was looking for a reason why this shouldn't be stabilized after so long... and here it is.
|
|
r=compiler-errors
Migrate `rustc_hir_analysis` to session diagnostic [Part 6]
Part 6: Finish `coherence/inherent_impls.rs` file
|
|
This is the default calling convention for ARM - it is used for extern "C",
therefore it supports varargs.
|
|
Improve invalid let expression handling
- Move all of the checks for valid let expression positions to parsing.
- Add a field to ExprKind::Let in AST/HIR to mark whether it's in a valid location.
- Suppress some later errors and MIR construction for invalid let expressions.
- Fix a (drop) scope issue that was also responsible for #104172.
Fixes #104172
Fixes #104868
|
|
Part 6: Finish `coherence/inherent_impls.rs`
|
|
|
|
interpret: change ABI-compat test to be type-based
This makes the test consistent across targets. Otherwise the chances are very high that ABI mismatches get accepted on x86_64 but still fail on many other targets with more complicated ABIs.
This implements (most of) the rules described in https://github.com/rust-lang/rust/pull/115476.
|
|
There was an incomplete version of the check in parsing and a second
version in AST validation. This meant that some, but not all, invalid
uses were allowed inside macros/disabled cfgs. It also means that later
passes have a hard time knowing when the let expression is in a valid
location, sometimes causing ICEs.
- Add a field to ExprKind::Let in AST/HIR to mark whether it's in a
valid location.
- Suppress later errors and MIR construction for invalid let
expressions.
|
|
These scopes would not exist in MIR and can cause ICEs with invalid uses
of let expressions.
|
|
Implement fallback for effect param
r? `@oli-obk` or `@lcnr`
tracking issue for this ongoing work: https://github.com/rust-lang/rust/issues/110395
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Add `FreezeLock` type and use it to store `Definitions`
This adds a `FreezeLock` type which allows mutation using a lock until the value is frozen where it can be accessed lock-free. It's used to store `Definitions` in `Untracked` instead of a `RwLock`. Unlike the current scheme of leaking read guards this doesn't deadlock if definitions is written to after no mutation are expected.
|
|
|
|
|
|
ConstParamHasTy
|
|
Permit recursive weak type aliases
I saw #63097 and thought "we can do ~~better~~ funnier". So here it is. It's not useful, but it's certainly something. This may actually become feasible with lazy norm (so in 5 years (constant, not reducing over time)).
r? `@estebank`
cc `@GuillaumeGomez`
|
|
|
|
|
|
This reverts commit cb9467515b5a9b15aaa905683c6b4dd9e851056c, reversing
changes made to 57781b24c54f9548722927ba88c343ff28da94ce.
|
|
Do not compute unneeded query results.
r? `@ghost`
|
|
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #115164 (MIR validation: reject in-place argument/return for packed fields)
- #115240 (codegen_llvm/llvm_type: avoid matching on the Rust type)
- #115294 (More precisely detect cycle errors from type_of on opaque)
- #115310 (Document panic behavior across editions, and improve xrefs)
- #115311 (Revert "Suggest using `Arc` on `!Send`/`!Sync` types")
- #115317 (Devacationize oli-obk)
- #115319 (don't use SnapshotVec in Graph implementation, as it looks unused; use Vec instead)
- #115322 (Tweak output of `to_pretty_impl_header` involving only anon lifetimes)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
|
|
Do not emit invalid suggestion in E0191 when spans overlap
Fix #115019.
|
|
Fix #115019.
|
|
fix ##113702
fix #113702
unknown unstable lint command lint
improve impelementation
|
|
|
|
|
|
Don't add associated type bound for non-types
We had this fix for equality constraints (#99890), but for some reason not trait constraints :sweat_smile:
Fixes #114744
|
|
Add `{Local}ModDefId` to more strongly type DefIds`
Based on #110862 by `@Nilstrieb`
|
|
fixed *const [type error] does not implement the Copy trait
Removes "error: arguments for inline assembly must be copyable" when moving an unknown type
Fixes: #113788
|
|
|
|
|
|
Select obligations before processing wf obligation in `compare_method_predicate_entailment`
We need to select obligations before processing the WF obligation for the `IMPLIED_BOUNDS_ENTAILMENT` lint, since it skips over type variables.
Fixes #114783
r? `@jackh726`
|
|
compare_method_predicate_entailment
|
|
This allows for better type safety in the compiler and also improves the
documentation for many things, making it clear that they expect modules.
|