| Age | Commit message (Collapse) | Author | Lines |
|
(cherry picked from commit e7b02046a0b34ec6d114a7ba5549db8457684ec4)
|
|
Fix #71584, fix #69683.
(cherry picked from commit a7b03ad4eddb65abede497dbc408244f23c36256)
|
|
|
|
|
|
Fix #71798.
|
|
|
|
|
|
Make Box<dyn FnOnce> respect self alignment
Closes #68304
r? @eddyb @nikomatsakis
|
|
Check that main/start is not async
* Add new error code E0752
* Add span to hir::IsAsync::Yes
* Emit an error if main or the start function is marked as async
* Add two regression tests
This PR fixes #68523.
|
|
fix -Zast-json to output correct JSON form
fixes #71086 (Reverts some of the changes made in #70215)
JSON output (from an empty library) after fix has something for **"id"** field
```shell
lonelyjoe@lonelyjoe-desktop:~/workspace/empty_lib/src$ rustc lib.rs -Zast-json
```
```json
{
"module":{
"inner":{
"lo":0,
"hi":94
},
"items":[
{
"attrs":[
{
"kind":{
"variant":"Normal",
"fields":[
{
"path":{
"span":{
"lo":0,
"hi":0
},
"segments":[
{
"ident":{
"name":"prelude_import",
"span":{
"lo":0,
"hi":0
}
},
"id":3,
"args":null
}
]
},
"args":"Empty"
}
]
},
"id":null,
"style":"Outer",
"span":{
"lo":0,
"hi":0
}
}
],
"id":4,
"span":{
"lo":0,
"hi":0
},
"vis":{
"node":"Inherited",
"span":{
"lo":0,
"hi":0
}
},
"ident":{
"name":"",
"span":{
"lo":0,
"hi":0
}
},
"kind":{
"variant":"Use",
"fields":[
{
"prefix":{
"span":{
"lo":0,
"hi":0
},
"segments":[
{
"ident":{
"name":"{{root}}",
"span":{
"lo":0,
"hi":0
}
},
"id":5,
"args":null
},
{
"ident":{
"name":"std",
"span":{
"lo":0,
"hi":0
}
},
"id":6,
"args":null
},
{
"ident":{
"name":"prelude",
"span":{
"lo":0,
"hi":0
}
},
"id":7,
"args":null
},
{
"ident":{
"name":"v1",
"span":{
"lo":0,
"hi":0
}
},
"id":8,
"args":null
}
]
},
"kind":"Glob",
"span":{
"lo":0,
"hi":0
}
}
]
},
"tokens":null
},
{
"attrs":[
{
"kind":{
"variant":"Normal",
"fields":[
{
"path":{
"span":{
"lo":0,
"hi":0
},
"segments":[
{
"ident":{
"name":"macro_use",
"span":{
"lo":0,
"hi":0
}
},
"id":9,
"args":null
}
]
},
"args":"Empty"
}
]
},
"id":null,
"style":"Outer",
"span":{
"lo":0,
"hi":0
}
}
],
"id":10,
"span":{
"lo":0,
"hi":0
},
"vis":{
"node":"Inherited",
"span":{
"lo":0,
"hi":0
}
},
"ident":{
"name":"std",
"span":{
"lo":0,
"hi":0
}
},
"kind":{
"variant":"ExternCrate",
"fields":[
null
]
},
"tokens":null
}
],
"inline":true
},
"attrs":[
],
"span":{
"lo":0,
"hi":94
},
"proc_macros":[
]
}
```
|
|
* Add new error code E0752
* Add span to hir::IsAsync::Yes
* Emit an error if main or the start function is marked as async
* Add two regression tests
Fix formatting errors and bless test outputs
* move tests to ui/async-await
fix test error text
remove span from IsAsync
|
|
|
|
Deprecate the asm! macro in favor of llvm_asm!
Since we will be changing the syntax of `asm!` soon, deprecate it and encourage people to use `llvm_asm!` instead (which preserves the old syntax). This will avoid breakage when `asm!` is changed.
RFC: https://github.com/rust-lang/rfcs/pull/2843
|
|
Fix some tests failing in `--pass check` mode
r? @RalfJung
|
|
miri-unleash test for llvm_asm
r? @oli-obk @ecstatic-morse
|
|
Do not show DefId in diagnostics
Fixes #71222
r? @estebank cc @eddyb
|
|
Fix false "never constructed" warnings for `Self::` variant paths
Closes #64362 .
|
|
|
|
|
|
Fixed missing trait method suggests incorrect code (self parameter not named "self").
fixes #71150
|
|
|
|
|
|
Make `needs_drop` less pessimistic on generators
Generators only have non-trivial drop logic when they may store (in upvars or across yields) a type that does.
This prevents generation of some unnecessary MIR in simple generators. There might be some impact on compile times, but this is probably limited in real-world applications.
~~This builds off of https://github.com/rust-lang/rust/pull/69814 since that contains some fixes that are made relevant by *this* PR (see https://github.com/rust-lang/rust/pull/69814#issuecomment-599147269).~~ (this has been merged)
|
|
Maintain chain of derived obligations
When evaluating the derived obligations from super traits, maintain a
reference to the original obligation in order to give more actionable
context in the output.
Continuation (and built on) #69745, subset of #69709.
r? @eddyb
|
|
|
|
|
|
|
|
|
|
When evaluating the derived obligations from super traits, maintain a
reference to the original obligation in order to give more actionable
context in the output.
|
|
miri-unleashed: test that we detect heap allocations
This removes the second-to-last use of `IS_SUPPORTED_IN_MIRI = false`.
r? @ecstatic-morse @oli-obk
|
|
|
|
outlives: ignore lifetimes shallowly found in `ty::FnDef`s.
Fixes #70917 by restoring the pre-#70164 behavior for now.
r? @nikomatsakis
|
|
|
|
Update the minimum external LLVM to 8
LLVM 8 was released on March 20, 2019, over a year ago.
|
|
Account for use of `try!()` in 2018 edition and guide users in the right direction
fixes #71155
|
|
Rename `asm` test directory in favor of `llvm_asm`
r? @Amanieu
|
|
Use query to determine whether function needs const checking
Resolves #69615.
The HIR const-checker was checking the `constness` of a function's `fn_sig` to determine whether a function needed const-checking. Now that const trait impls are a thing, this is no longer enough. All code should use the `is_const_fn_raw` query instead, which takes the constness of the impl block into account.
r? @oli-obk
|
|
|
|
direction
|
|
Add `ConstKind::Error` and convert `ErrorHandled::Reported` to it.
By replicating the `ty::Error` approach to encoding "an error has occurred", all of the mechanisms that skip redundant/downstream errors are engaged and help out (see the reduction in test output).
This PR also adds `ErrorHandled::Linted` for the lint case because using `ErrorHandled::Reported` *without* having emitted an error that is *guaranteed* to stop compilation, is incorrect now.
r? @oli-obk cc @rust-lang/wg-const-eval @varkor @yodaldevoid
|
|
|
|
rustc_target::abi: add Primitive variant to FieldsShape.
Originally suggested by @eddyb.
|
|
Miri error messages: avoid try terminology
r? @oli-obk
|
|
Add some regression tests
Closes #24843
Closes #28575
Closes #54067
Closes #66868
Closes #67893
Closes #68813
|
|
reword Miri validity errors: undefined -> uninitialized
I don't think we say "undefined value" or anything like that anywhere in the docs or so, but we do use the term "uninitialized memory", so I think we should do the same here.
Longer-term, I think we should also internally rename "undef" to "uninit".
r? @oli-obk
|
|
Add long error explanation for E0657
Added proper error explanation for issue E0657 in the Rust compiler.
Part of #61137
r? @GuillaumeGomez
|
|
r=GuillaumeGomez
Add long error explanation for E0708 #61137
Add long explanation for the E0708 error code
Part of #61137
r? @GuillaumeGomez
|
|
|
|
|
|
|