| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
|
|
Remove err methods
To be merged after #42519.
cc @Susurrus @QuietMisdreavus
|
|
Move type parameter shadowing test to `ui`
Fix #20729.
|
|
syntax: allow negative integer literal expression to be interpolated as pattern
Fixes #42820.
r? @jseyfried
|
|
add `allow_fail` test attribute
This change allows the user to add an `#[allow_fail]` attribute to
tests that will cause the test to compile & run, but if the test fails
it will not cause the entire test run to fail. The test output will
show the failure, but in yellow instead of red, and also indicate that
it was an allowed failure.
Here is an example of the output: http://imgur.com/a/wt7ga
|
|
|
|
|
|
rustc_typeck: enforce argument type is sized
closes #42312
r? @nikomatsakis
|
|
|
|
|
|
Detect missing `;` on methods with return type `()`
- Point out the origin of a type requirement when it is the return type
of a method
- Point out possibly missing semicolon when the return type is `()` and
the implicit return makes sense as a statement
- Suggest changing the return type of methods with default return type
- Don't suggest changing the return type on `fn main()`
- Don't suggest changing the return type on impl fn
- Suggest removal of semicolon (instead of being help)
|
|
|
|
|
|
|
|
|
|
|
|
remove variant `Token::SubstNt` in favor of `quoted::TokenTree::MetaVar`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Add tests for a few issues.
Fixes #41998
Fixes #38381
Fixes #37515
Fixes #37510
Fixes #37366
Fixes #37323
Fixes #37051
Fixes #36839
Fixes #35570
Fixes #34373
Fixes #34222
Certainly not all of the E-needstest issues right now, but I started to get bored.
|
|
|
|
|
|
r=Mark-Simulacrum
change span label for E0435
r? @Mark-Simulacrum
|
|
Print the two types in the span label for transmute errors.
Fixes #37157. I'm not entirely happy with the changes here but overall it's better in my opinion; we certainly avoid the odd language in that issue, which changes to:
```
error[E0512]: transmute called with differently sized types: <C as TypeConstructor<'a>>::T (size can vary because of <C as TypeConstructor>::T) to <C as TypeConstructor<'b>>::T (size can vary because of <C as TypeConstructor>::T)
--> test.rs:8:5
|
8 | ::std::mem::transmute(x)
| ^^^^^^^^^^^^^^^^^^^^^ transmuting between <C as TypeConstructor<'a>>::T and <C as TypeConstructor<'b>>::T
error: aborting due to previous error(s)
```
|
|
New error codes
Part of #42229.
cc @Susurrus @frewsxcv @QuietMisdreavus
|
|
|
|
|
|
Change the for-loop desugar so the `break` does not affect type inference. Fixes #42618
Rewrite the `for` loop desugaring to avoid contaminating the inference results. Under the older desugaring, `for x in vec![] { .. }` would erroneously type-check, even though the type of `vec![]` is unconstrained. (written by @nikomatsakis)
|
|
Integrate jobserver support to parallel codegen
This commit integrates the `jobserver` crate into the compiler. The crate was
previously integrated in to Cargo as part of rust-lang/cargo#4110. The purpose
here is to two-fold:
* Primarily the compiler can cooperate with Cargo on parallelism. When you run
`cargo build -j4` then this'll make sure that the entire build process between
Cargo/rustc won't use more than 4 cores, whereas today you'd get 4 rustc
instances which may all try to spawn lots of threads.
* Secondarily rustc/Cargo can now integrate with a foreign GNU `make` jobserver.
This means that if you call cargo/rustc from `make` or another
jobserver-compatible implementation it'll use foreign parallelism settings
instead of creating new ones locally.
As the number of parallel codegen instances in the compiler continues to grow
over time with the advent of incremental compilation it's expected that this'll
become more of a problem, so this is intended to nip concurrent concerns in the
bud by having all the tools to cooperate!
Note that while rustc has support for itself creating a jobserver it's far more
likely that rustc will always use the jobserver configured by Cargo. Cargo today
will now set a jobserver unconditionally for rustc to use.
|
|
Add compile_error!
Related to #40872
|
|
Implement Sync for SyncSender
r? @alexcrichton
|
|
This commit integrates the `jobserver` crate into the compiler. The crate was
previously integrated in to Cargo as part of rust-lang/cargo#4110. The purpose
here is to two-fold:
* Primarily the compiler can cooperate with Cargo on parallelism. When you run
`cargo build -j4` then this'll make sure that the entire build process between
Cargo/rustc won't use more than 4 cores, whereas today you'd get 4 rustc
instances which may all try to spawn lots of threads.
* Secondarily rustc/Cargo can now integrate with a foreign GNU `make` jobserver.
This means that if you call cargo/rustc from `make` or another
jobserver-compatible implementation it'll use foreign parallelism settings
instead of creating new ones locally.
As the number of parallel codegen instances in the compiler continues to grow
over time with the advent of incremental compilation it's expected that this'll
become more of a problem, so this is intended to nip concurrent concerns in the
bud by having all the tools to cooperate!
Note that while rustc has support for itself creating a jobserver it's far more
likely that rustc will always use the jobserver configured by Cargo. Cargo today
will now set a jobserver unconditionally for rustc to use.
|
|
Clearer Error Message for Duplicate Definition
Clearer use of the error message and span labels to communicate duplication definitions/imports.
fixes #42061
|
|
|
|
Related to #40872
|
|
Also moves a few transmute tests to UI tests to better test their
output.
|
|
Fixes #11740.
Fixes #19601.
Fixes #22603
Fixes #22789.
Fixes #26614.
r? @Mark-Simulacrum.
|
|
Report error for assignment in `if` condition
For code like `if x = 3 {}`, output:
```
error[E0308]: mismatched types
--> $DIR/issue-17283.rs:25:8
|
25 | if x = x {
| ^^^^^
| |
| help: did you mean to compare equality? `x == x`
| expected bool, found ()
|
= note: expected type `bool`
found type `()`
```
Fix #40926.
|
|
Suppress trait errors that are implied by other errors
this is currently a hack and should be cleaned up somewhat. Posting this to get some feedback.
r? @nikomatsakis
cc @estebank
|
|
Remove struct_field_attributes feature gate
Part of #41681. ~This PR only removes the feature gate; this *does not* update any documentations.~ This PR removes the feature gate and the corresponding chapter of the Unstable Book.
I'm not very sure about the changes I made though... Just followed the stabilization guideline.
r? @nikomatsakis
|
|
Error codes new
Part of #42229.
cc @Susurrus @frewsxcv @QuietMisdreavus
|
|
E0608
Part of #42229.
cc @Susurrus
|