| Age | Commit message (Collapse) | Author | Lines |
|
|
|
When trying to use a value after move, instead of using a note, point
at the local declaration that has a type that doesn't implement `Copy`
trait.
|
|
|
|
Add suggestion for incorrect field syntax.
Fixes #57684.
This commit adds a suggestion when a `=` character is used when
specifying the value of a field in a struct constructor incorrectly
instead of a `:` character.
r? @estebank
|
|
Get rid of the fake stack frame for reading from constants
r? @RalfJung
fixes the ice in https://github.com/rust-lang/rust/issues/53708 but still keeps around the wrong "non-exhaustive match" error
cc @varkor
|
|
Remove quote_*! macros
This deletes a considerable amount of test cases, some of which we may want to keep. I'm not entirely certain what the primary intent of many of them was; if we should keep them I can attempt to edit each case to continue compiling without the quote_*! macros involved.
Fixes #46849.
Fixes #12265.
Fixes #12266.
Fixes #26994.
r? @Manishearth
|
|
|
|
Add intrinsic to create an integer bitmask from a vector mask
This PR adds a new simd intrinsic: `simd_bitmask(vector) -> unsigned integer` that creates an integer bitmask from a vector mask by extracting one bit of each vector lane.
This is required to implement: https://github.com/rust-lang-nursery/packed_simd/issues/166 .
EDIT: the reason we need an intrinsics for this is that we have to truncate the vector lanes to an `<i1 x N>` vector, and then bitcast that to an `iN` integer (while making sure that we only materialize `i8`, ... , `i64` - that is, no `i1`, `i2`, `i4`, types), and we can't do any of that in a Rust library.
r? @rkruppe
|
|
Fix some cross crate existential type ICEs
fixes #53443
|
|
Stabilize Any::get_type_id and rename to type_id
FCP: https://github.com/rust-lang/rust/issues/27745#issuecomment-373906749
Closes https://github.com/rust-lang/rust/issues/27745.
|
|
Add error for trailing angle brackets.
Fixes #54521.
This PR adds a error (and accompanying machine applicable
suggestion) for trailing angle brackets on function calls with a
turbofish.
r? @estebank
|
|
Use structured suggestion in stead of notes
|
|
Explain type mismatch cause pointing to return type when it is `impl Trait`
Fix #57743.
|
|
Recover from parse errors in literal struct fields and incorrect float literals
Fix #52496.
|
|
This commit adds a suggestion when a `=` character is used when
specifying the value of a field in a struct constructor incorrectly
instead of a `:` character.
|
|
|
|
This commit adds errors and accompanying suggestions as below:
```
bar::<<<<<T as Foo>::Output>();
^^^ help: remove extra angle brackets
```
|
|
typeck: remove leaky nested probe during trait object method resolution
addresses #57673 (but not marking with f-x because thats now afflicting beta channel).
Fix #57216
|
|
|
|
|
|
|
|
|
|
Rollup of 9 pull requests
Successful merges:
- #57537 (Small perf improvement for fmt)
- #57552 (Default images)
- #57604 (Make `str` indexing generic on `SliceIndex`.)
- #57667 (Fix memory leak in P::filter_map)
- #57677 (const_eval: Predetermine the layout of all locals when pushing a stack frame)
- #57791 (Add regression test for #54582)
- #57798 (Corrected spelling inconsistency)
- #57809 (Add powerpc64-unknown-freebsd)
- #57813 (fix validation range printing when encountering undef)
Failed merges:
r? @ghost
|
|
FCP: https://github.com/rust-lang/rust/issues/27745#issuecomment-373906749
|
|
fix validation range printing when encountering undef
|
|
Corrected spelling inconsistency
resolves #57773
|
|
Add regression test for #54582
Fix #54582.
|
|
Make `str` indexing generic on `SliceIndex`.
Fixes #55603
|
|
Remove unnecessary dummy span checks
The emitter already verifies wether a given span note or span label
can be emitted to the output. If it can't, because it is a dummy
span, it will be either elided for labels or emitted as an unspanned
note/help when applicable.
|
|
|
|
resolves #57773
|
|
Add signed num::NonZeroI* types
Multiple people have asked for them in https://github.com/rust-lang/rust/issues/49137. Given that the unsigned ones already exist, they are very easy to add and not an additional maintenance burden.
|
|
|
|
This commit extends the trailing `>` detection to also work for paths
such as `Foo::<Bar>>:Baz`.
This involves making the existing check take the token that is expected
to follow the path being checked as a parameter.
Care is taken to ensure that this only happens on the construction of a
whole path segment and not a partial path segment (during recursion).
Through this enhancement, it was also observed that the ordering of
right shift token and greater than tokens was overfitted to the examples
being tested.
In practice, given a sequence of `>` characters: `>>>>>>>>>`
..then they will be split into `>>` eagerly: `>> >> >> >> >`.
..but when a `<` is prepended, then the first `>>` is split:
`<T> > >> >> >> >`
..and then when another `<` is prepended, a right shift is first again:
`Vec<<T>> >> >> >> >`
In the previous commits, a example that had two `<<` characters was
always used and therefore it was incorrectly assumed that `>>` would
always be first - but when there is a single `<`, this is not the case.
|
|
Make raw ptr ops unsafe in const contexts
r? @RalfJung
cc @Centril
|
|
This commit pluralizes error messages when more than a single trailing
`>` character is present.
|
|
This commit adds a error (and accompanying machine applicable
suggestion) for trailing angle brackets on function calls with a
turbofish.
|
|
|
|
The diagnostic for this error prints `the following implementations
were found` followed by the first N relevant impls, sorted.
This commit makes the sort happen before slicing,
so that the set of impls being printed is deterministic
when the input is not.
|
|
|
|
Add `is_sorted` to `Iterator` and `[T]`
This is an initial implementation for the first step of [RFC 2351](https://github.com/rust-lang/rfcs/blob/master/text/2351-is-sorted.md)
Tracking issue: https://github.com/rust-lang/rust/issues/53485
|
|
This commit extends previous work in #55007 where the name from the
visible parent was used for modules. Now, we also print the name from
the visible parent for types.
|
|
|
|
|
|
Add span for bad doc comment
Fixes #57382
r? @estebank
|
|
Add "dereference boxed value" suggestion.
Contributes to #57741.
This PR adds a `help: consider dereferencing the boxed value` suggestion to discriminants of match statements when the match arms have type `T` and the discriminant has type `Box<T>`.
r? @estebank
|
|
Suggest correct cast for struct fields with shorthand syntax
```
error[E0308]: mismatched types
--> $DIR/type-mismatch-struct-field-shorthand.rs:8:19
|
LL | let _ = RGB { r, g, b };
| ^ expected f64, found f32
help: you can cast an `f32` to `f64` in a lossless way
|
LL | let _ = RGB { r: r.into(), g, b };
| ^^^^^^^^^^^
```
Fix #52497.
|
|
Continue parsing after parent type args and suggest using angle brackets
```
error[E0214]: parenthesized parameters may only be used with a trait
--> $DIR/E0214.rs:2:15
|
LL | let v: Vec(&str) = vec!["foo"];
| ^^^^^^
| |
| only traits may use parentheses
| help: use angle brackets instead: `<&str>`
```
r? @zackmdavis
|
|
Change bounds on `TryFrom` blanket impl to use `Into` instead of `From`
This is from this [comment](https://github.com/rust-lang/rust/issues/33417#issuecomment-447111156) I made.
This will expand the impls available for `TryFrom` and `TryInto`, without losing anything in the process.
|
|
|