| Age | Commit message (Collapse) | Author | Lines |
|
|
|
impl_trait_in_bindings is not yet complete and can lead to compiler crashes.
Fixes #60764.
|
|
|
|
And also the equality between `Path` and strings, because `Path` is made
up of `Symbol`s.
|
|
|
|
Because it's going to be used a lot.
|
|
Implement built-in await syntax
Adds support for .await under the existing async_await feature gate.
Moves macro-like await! syntax to the await_macro feature gate.
Removes support for `await` as a non-keyword under the `async_await`
feature.
This new syntax is not final, but is the consensus solution proposed by the lang team, as explained in https://boats.gitlab.io/blog/post/await-decision/
Fix https://github.com/rust-lang/rust/issues/51719
Fix https://github.com/rust-lang/rust/issues/51751
Fix https://github.com/rust-lang/rust/issues/60016
|
|
Adds support for .await under the existing async_await feature gate.
Moves macro-like await! syntax to the await_macro feature gate.
Removes support for `await` as a non-keyword under the `async_await`
feature.
|
|
|
|
|
|
|
|
Cleanup 'active' declare_features! with uniform style + sorting.
r? @oli-obk
(added the FIXME you wanted)
cc https://github.com/rust-lang/rust/pull/60354
cc https://github.com/rust-lang/rust/issues/60361
|
|
Cleanup declare_features! for 'accepted' with a uniform style + sort them
r? @oli-obk
cc https://github.com/rust-lang/rust/pull/60362
cc https://github.com/rust-lang/rust/issues/60361
|
|
|
|
|
|
|
|
Make `-Z allow-features` work for stdlib features
r? @cramertj
|
|
|
|
|
|
This also fully stabilizes two-phase borrows on all editions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
flag them as unused.
|
|
attribute.
|
|
Expand suggestions for type ascription parse errors
Fix #51222. CC #48016, #47666, #54516, #34255.
|
|
In order to minimize the verbosity of common syntax errors that are parsed
as type ascription, hide the feature gate error unless there are no other
errors being emitted by the parser.
|
|
|
|
Remove methods `Attribute::span` and `MetaItem::span` duplicating public fields
|
|
|
|
Add `-Z allow_features=...` flag
Adds a compiler option to allow only whitelisted features.
For projects on nightly that want to prevent feature-creep (and maybe, someday, move off of nightly). Not being able to enforce this has been a problem on Fuchsia and at other big companies.
This doesn't support filtering edition feature flags, but someone is welcome to add that if they need it.
|
|
|
|
|
|
Mention `unwind(aborts)` in diagnostics for `#[unwind]`
Simplify input validation for `#[unwind]`, add tests
cc https://github.com/rust-lang/rust/issues/58760
r? @Mark-Simulacrum
|
|
Support defining C compatible variadic functions
## Summary
Add support for defining C compatible variadic functions in unsafe rust with
`extern "C"` according to [RFC 2137].
## Details
### Parsing
When parsing a user defined function that is `unsafe` and `extern "C"` allow
variadic signatures and inject a "spoofed" `VaList` in the new functions
signature. This allows the user to interact with the variadic arguments via a
`VaList` instead of manually using `va_start` and `va_end` (See [RFC 2137] for
details).
### Codegen
When running codegen for a variadic function, remove the "spoofed" `VaList`
from the function signature and inject `va_start` when the arg local
references are created for the function and `va_end` on return.
## TODO
- [x] Get feedback on injecting `va_start/va_end` in MIR vs codegen
- [x] Properly inject `va_end` - It seems like it should be possible to inject
`va_end` on the `TerminatorKind::Return`. I just need to figure out how
to get the `LocalRef` here.
- [x] Properly call Rust defined C variadic functions in Rust - The spoofed
`VaList` causes problems here.
Related to: #44930
r? @ghost
[RFC 2137]: https://github.com/rust-lang/rfcs/blob/master/text/2137-variadic.md
|
|
|
|
Add tracking issue for the unwind attribute
cc https://github.com/rust-lang/rust/issues/58760
|
|
Deny `async fn` in 2015 edition
This commit prevents code using `async fn` from being compiled in Rust 2015 edition.
Compiling code of the form:
```rust
async fn foo() {}
```
Will now result in the error:
```
error[E0670]: `async fn` is not permitted in the 2015 edition
--> async.rs:1:1
|
1 | async fn foo() {}
| ^^^^^
error: aborting due to error
For more information about an error, try `rustc --explain E0670`.
```
This resolves #58652 and also resolves #53714.
r? @varkor
|
|
Simplify input validation for `#[unwind]`, add tests
|
|
|
|
|
|
Fix style issues and update diagnostic messages
Update src/librustc_passes/diagnostics.rs
Co-Authored-By: doctorn <me@nathancorbyn.com>
Deny nested `async fn` in Rust 2015 edition
Deny nested `async fn` in Rust 2015 edition
Deny nested `async fn` in Rust 2015 edition
|
|
|