| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
Remove an outdated test output file
It was accidentally introduced during some rebase, but it's no longer necessary and `--bless` removes it, but it doesn't fail testing.
|
|
syntax: add parser recovery for intersection- / and-patterns `p1 @ p2`
Fixes https://github.com/rust-lang/rust/issues/65400.
The recovery comes in two flavors:
1. We know that `p2` is a binding so we can invert as `p2 @ p1`:
```rust
error: pattern on wrong side of `@`
--> $DIR/intersection-patterns.rs:13:9
|
LL | Some(x) @ y => {}
| -------^^^-
| | |
| | binding on the right, should be to the left
| pattern on the left, should be to the right
| help: switch the order: `y @ Some(x)`
```
2. Otherwise we emit a generic diagnostic for the lack of support for intersection patterns:
```rust
error: left-hand side of `@` must be a binding
--> $DIR/intersection-patterns.rs:23:9
|
LL | Some(x) @ Some(y) => {}
| -------^^^-------
| | |
| | also a pattern
| interpreted as a pattern, not a binding
|
= note: bindings are `x`, `mut x`, `ref x`, and `ref mut x`
```
For more on and-patterns, see e.g. https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/pattern-matching#and-pattern.
r? @davidtwco
cc @varkor @lzutao
|
|
Bring attention to suggestions when the only difference is capitalization
CC #65386.
|
|
Include const generic arguments in metadata
Fixes #64707
Fixes #61624
Fixes #64730
r? @varkor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Compute the layout of uninhabited structs
fixes #64506
r? @eddyb
|
|
|
|
Add some tests for fixed ICEs
Fixes #44153 (from 1.23.0)
Fixes #47486 (from 1.36.0)
Fixes #48010 (from 1.38.0)
Fixes #48027 (from nightly)
Fixes #48638 (from nightly)
|
|
Print lifetimes with backticks
Fixes #65287
r? @varkor
|
|
Add long error explanation for E0697
Part of #61137
r? @GuillaumeGomez
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Don't discard value names when using address or memory sanitizer
The value names are used when reporting issues found by address
sanitizer or memory sanitizer. Avoid discarding names when those
sanitizers are enabled, unless explicitly requested to do otherwise.
|
|
Fix #[unwind(abort)] with Rust ABI
Fixes #63883.
|
|
nounwind tests and cleanup
This is a follow-up to @pnkfelix' https://github.com/rust-lang/rust/pull/65020. In particular it adds some tests as @nagisa asked. It also does a cleanup that the original PR omitted to reduce backporting risks.
I hope I finally managed to write an uncontroversial PR in this area. ;) This should not change any behavior, just test it better.
|
|
Split non-CAS atomic support off into target_has_atomic_load_store
This PR implements my proposed changes in https://github.com/rust-lang/rust/issues/32976#issuecomment-518542029 by removing `target_has_atomic = "cas"` and splitting `target_has_atomic` into two separate `cfg`s:
* `target_has_atomic = 8/16/32/64/128`: This indicates the largest width that the target can atomically CAS (which implies support for all atomic operations).
* ` target_has_atomic_load_store = 8/16/32/64/128`: This indicates the largest width that the target can support loading or storing atomically (but may not support CAS).
cc #32976
r? @alexcrichton
|
|
Report `CONST_ERR` lint in external macros
fixes #65300
fixes #61058
r? @oli-obk
|
|
resolve: fix error title regarding private constructors
One reason is that constructors can be private while their types can be
public.
Idea credit to @petrochenkov, discussed at #65153
|
|
Suggest `if let` on `let` refutable binding
Fix #58385.
|
|
The value names are used when reporting issues found by address
sanitizer or memory sanitizer. Avoid discarding names when those
sanitizers are enabled, unless explicitly requested to do otherwise.
|
|
MIR typeck needed more normalize
Add some missing normalization calls (@nagisa [was right](https://github.com/rust-lang/rust/issues/63154#issuecomment-517305589)).
Fix #63154
|
|
|
|
|
|
|
|
|
|
|
|
r=Mark-Simulacrum
Don't pass doctest feature by default
As asked in https://github.com/rust-lang/rust/pull/63803#issuecomment-539064434.
r? @QuietMisdreavus
|
|
Rollup of 15 pull requests
Successful merges:
- #64337 (libstd: Fix typos in doc)
- #64986 (Function pointers as const generic arguments)
- #65048 (Added doc about behavior of extend on HashMap)
- #65191 (Add some regression tests)
- #65200 (Add ?Sized bound to a supertrait listing in E0038 error documentation)
- #65205 (Add long error explanation for E0568)
- #65220 (Update LLVM for Emscripten exception handling support)
- #65263 (Deduplicate is_{freeze,copy,sized}_raw)
- #65266 (Mark Path::join as must_use)
- #65276 (Don't cc rust-lang/compiler for toolstate changes)
- #65277 (Query generator kind for error reporting)
- #65283 (stability: Do not use `buffer_lint` after lowering to HIR)
- #65289 (Fix suggested bound addition diagnostic)
- #65310 (deriving: avoid dummy Span on an artificial `type_ident` path)
- #65321 (Remove painful test that is not pulling its weight)
Failed merges:
r? @ghost
|
|
pnkfelix:targetted-fix-for-always-marking-rust-abi-unwind-issue-64655, r=alexcrichton
Always mark rust and rust-call abi's as unwind
PR #63909 identified a bug that had been injected by PR #55982. As discussed on https://github.com/rust-lang/rust/issues/64655#issuecomment-537517428 , we started marking extern items as nounwind, *even* extern items that said they were using "Rust" or "rust-call" ABI.
This is a more targeted variant of PR #63909 that fixes the above bug.
Fix #64655
----
I personally suspect we will want PR #63909 to land in the long-term
But:
* it is not certain that PR #63909 *will* land,
* more importantly, PR #63909 almost certainly will not be backported to beta/stable.
The identified bug was more severe than I think anyone realized (apart from perhaps @gnzlbg, as noted [here](https://github.com/rust-lang/rust/pull/63909#issuecomment-524818838)).
Thus, I was motivated to write this PR, which fixes *just* the issue with extern rust/rust-call functions, and deliberately avoids injecting further deviation from current behavior (you can see further notes on this in the comments of the code added here).
|
|
r=nikomatsakis
Remove painful test that is not pulling its weight
Research suggests that we are not properly testing this case anyway, and
even if we were, it is unlikely that we will regress here -- or, perhaps
more accurately, if we do, I am uncertain that we care too much. It
definitely seems like an edge case, and one that is particularly
unlikely to occur as time goes on.
Fixes https://github.com/rust-lang/rust/issues/63520
|
|
deriving: avoid dummy Span on an artificial `type_ident` path
The dummy Span pointed to the beginning of the source file instead to where the `#[derive]` is located. Later, it tripped the `in_derive_expansion(span)` check at `src/librustc/middle/stability.rs`, causing a span-less deprecation warning to be emitted.
Fixes #56195, Fixes #55417.
|
|
Fix suggested bound addition diagnostic
Fixes #65284.
|
|
stability: Do not use `buffer_lint` after lowering to HIR
Fixes https://github.com/rust-lang/rust/issues/65253
|
|
Query generator kind for error reporting
Fixes https://github.com/rust-lang/rust/pull/65166#discussion_r333114545
r? @estebank
cc @cramertj
|
|
Add long error explanation for E0568
Part of #61137.
|
|
Add some regression tests
- Add a test for #62187.
- Clean up the directory structure in `src/test/ui/const-generics`
- Closes #64792.
- Closes #57399.
- Closes #57271.
|
|
Function pointers as const generic arguments
Makes function pointers as const generic arguments usable.
Fixes #62395
r? @varkor
|
|
Research suggests that we are not properly testing this case anyway, and
even if we were, it is unlikely that we will regress here -- or, perhaps
more accurately, if we do, I am uncertain that we care too much. It
definitely seems like an edge case, and one that is particularly
unlikely to occur as time goes on.
|
|
|