Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 8652177

Browse files
author
The Miri Cronjob Bot
committed
Merge from rustc
2 parents 70628f8 + f4f0faf commit 8652177

File tree

350 files changed

+3526
-1195
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

350 files changed

+3526
-1195
lines changed

.gitattributes

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
*.cpp rust
55
*.h rust
66
*.rs rust diff=rust
7-
*.fixed linguist-language=Rust -merge
8-
*.mir linguist-language=Rust -merge
9-
*.stderr -merge
10-
*.stdout -merge
7+
*.fixed linguist-language=Rust
8+
*.mir linguist-language=Rust
119
src/etc/installer/gfx/* binary
1210
src/vendor/** -text
1311
Cargo.lock linguist-generated=false

compiler/rustc_ast/src/util/comments/tests.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg_attr(not(bootstrap), allow(rustc::symbol_intern_string_literal))]
2+
13
use rustc_span::create_default_session_globals_then;
24

35
use super::*;

compiler/rustc_ast_passes/src/feature_gate.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -511,11 +511,6 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
511511
"you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`"
512512
);
513513
gate_all!(let_chains, "`let` expressions in this position are unstable");
514-
gate_all!(
515-
async_closure,
516-
"async closures are unstable",
517-
"to use an async block, remove the `||`: `async {`"
518-
);
519514
gate_all!(
520515
async_trait_bounds,
521516
"`async` trait bounds are unstable",

compiler/rustc_codegen_llvm/src/llvm/ffi.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ use super::debuginfo::{
1717
DebugEmissionKind, DebugNameTableKind,
1818
};
1919

20-
pub type Bool = c_uint;
20+
/// In the LLVM-C API, boolean values are passed as `typedef int LLVMBool`,
21+
/// which has a different ABI from Rust or C++ `bool`.
22+
pub type Bool = c_int;
2123

2224
pub const True: Bool = 1 as Bool;
2325
pub const False: Bool = 0 as Bool;

compiler/rustc_error_codes/src/error_codes/E0307.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ impl Trait for Foo {
6565
```
6666

6767
The nightly feature [Arbitrary self types][AST] extends the accepted
68-
set of receiver types to also include any type that can dereference to
69-
`Self`:
68+
set of receiver types to also include any type that implements the
69+
`Receiver` trait and can follow its chain of `Target` types to `Self`.
70+
There's a blanket implementation of `Receiver` for `T: Deref`, so any
71+
type which dereferences to `Self` can be used.
7072

7173
```
7274
#![feature(arbitrary_self_types)]

compiler/rustc_error_codes/src/error_codes/E0708.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
Erroneous code example:
66

77
```edition2018
8-
#![feature(async_closure)]
9-
108
fn main() {
119
let add_one = async |num: u8| {
1210
num + 1
@@ -18,8 +16,6 @@ fn main() {
1816
version, you can use successfully by using move:
1917

2018
```edition2018
21-
#![feature(async_closure)]
22-
2319
fn main() {
2420
let add_one = async move |num: u8| { // ok!
2521
num + 1

compiler/rustc_errors/src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ mod styled_buffer;
9494
mod tests;
9595
pub mod translation;
9696

97-
pub type PErr<'a> = Diag<'a>;
98-
pub type PResult<'a, T> = Result<T, PErr<'a>>;
97+
pub type PResult<'a, T> = Result<T, Diag<'a>>;
9998

10099
rustc_fluent_macro::fluent_messages! { "../messages.ftl" }
101100

@@ -576,6 +575,10 @@ pub enum StashKey {
576575
UndeterminedMacroResolution,
577576
/// Used by `Parser::maybe_recover_trailing_expr`
578577
ExprInPat,
578+
/// If in the parser we detect a field expr with turbofish generic params it's possible that
579+
/// it's a method call without parens. If later on in `hir_typeck` we find out that this is
580+
/// the case we suppress this message and we give a better suggestion.
581+
GenericInFieldExpr,
579582
}
580583

581584
fn default_track_diagnostic<R>(diag: DiagInner, f: &mut dyn FnMut(DiagInner) -> R) -> R {

compiler/rustc_feature/src/accepted.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ declare_features! (
7272
(accepted, associated_types, "1.0.0", None),
7373
/// Allows free and inherent `async fn`s, `async` blocks, and `<expr>.await` expressions.
7474
(accepted, async_await, "1.39.0", Some(50547)),
75+
/// Allows `async || body` closures.
76+
(accepted, async_closure, "CURRENT_RUSTC_VERSION", Some(62290)),
7577
/// Allows async functions to be declared, implemented, and used in traits.
7678
(accepted, async_fn_in_trait, "1.75.0", Some(91611)),
7779
/// Allows all literals in attribute lists and values of key-value pairs.

compiler/rustc_feature/src/unstable.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,8 @@ declare_features! (
388388
(unstable, associated_const_equality, "1.58.0", Some(92827)),
389389
/// Allows associated type defaults.
390390
(unstable, associated_type_defaults, "1.2.0", Some(29661)),
391-
/// Allows `async || body` closures.
392-
(unstable, async_closure, "1.37.0", Some(62290)),
391+
/// Allows async functions to be called from `dyn Trait`.
392+
(incomplete, async_fn_in_dyn_trait, "CURRENT_RUSTC_VERSION", Some(133119)),
393393
/// Allows `#[track_caller]` on async functions.
394394
(unstable, async_fn_track_caller, "1.73.0", Some(110011)),
395395
/// Allows `for await` loops.

compiler/rustc_hir/src/tests.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg_attr(not(bootstrap), allow(rustc::symbol_intern_string_literal))]
2+
13
use rustc_data_structures::stable_hasher::Hash64;
24
use rustc_span::def_id::{DefPathHash, StableCrateId};
35
use rustc_span::edition::Edition;

0 commit comments

Comments
 (0)