Skip to content

Commit 2a97c26

Browse files
committed
Merge from rust-lang/rust
2 parents 86e6ace + e9fc5f5 commit 2a97c26

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

crates/hir-def/src/attr/builtin.rs

-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
207207
),
208208

209209
// Entry point:
210-
gated!(unix_sigpipe, Normal, template!(Word, NameValueStr: "inherit|sig_ign|sig_dfl"), ErrorFollowing, experimental!(unix_sigpipe)),
211210
ungated!(start, Normal, template!(Word), WarnFollowing),
212211
ungated!(no_start, CrateLevel, template!(Word), WarnFollowing),
213212
ungated!(no_main, CrateLevel, template!(Word), WarnFollowing),

crates/hir-ty/src/layout.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use base_db::salsa::Cycle;
66
use chalk_ir::{AdtId, FloatTy, IntTy, TyKind, UintTy};
77
use hir_def::{
88
layout::{
9-
Abi, FieldsShape, Integer, LayoutCalculator, LayoutS, Primitive, ReprOptions, Scalar, Size,
10-
StructKind, TargetDataLayout, WrappingRange,
9+
Abi, FieldsShape, Float, Integer, LayoutCalculator, LayoutS, Primitive, ReprOptions,
10+
Scalar, Size, StructKind, TargetDataLayout, WrappingRange,
1111
},
1212
LocalFieldId, StructId,
1313
};
@@ -264,10 +264,10 @@ pub fn layout_of_ty_query(
264264
),
265265
chalk_ir::Scalar::Float(f) => scalar(
266266
dl,
267-
match f {
268-
FloatTy::F32 => Primitive::F32,
269-
FloatTy::F64 => Primitive::F64,
270-
},
267+
Primitive::Float(match f {
268+
FloatTy::F32 => Float::F32,
269+
FloatTy::F64 => Float::F64,
270+
}),
271271
),
272272
},
273273
TyKind::Tuple(len, tys) => {

crates/ide-db/src/generated/lints.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -3869,7 +3869,7 @@ use std::ops::{Coroutine, CoroutineState};
38693869
use std::pin::Pin;
38703870
38713871
fn main() {
3872-
let mut coroutine = || {
3872+
let mut coroutine = #[coroutine] || {
38733873
yield 1;
38743874
return "foo"
38753875
};
@@ -3901,7 +3901,7 @@ use std::ops::Coroutine;
39013901
use std::pin::Pin;
39023902
39033903
fn main() {
3904-
let mut coroutine = || {
3904+
let mut coroutine = #[coroutine] || {
39053905
println!("2");
39063906
yield;
39073907
println!("4");
@@ -4007,7 +4007,7 @@ use std::pin::Pin;
40074007
40084008
fn main() {
40094009
let ret = "foo";
4010-
let mut coroutine = move || {
4010+
let mut coroutine = #[coroutine] move || {
40114011
yield 1;
40124012
return ret
40134013
};

crates/parser/src/lexed_str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ impl<'a> Converter<'a> {
178178
rustc_lexer::TokenKind::Ident => {
179179
SyntaxKind::from_keyword(token_text).unwrap_or(IDENT)
180180
}
181-
rustc_lexer::TokenKind::InvalidIdent => {
181+
rustc_lexer::TokenKind::InvalidPrefix | rustc_lexer::TokenKind::InvalidIdent => {
182182
err = "Ident contains invalid characters";
183183
IDENT
184184
}

0 commit comments

Comments
 (0)