mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Merge from rust-lang/rust
This commit is contained in:
commit
49cae17fa2
4 changed files with 10 additions and 11 deletions
|
@ -207,7 +207,6 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
|
||||||
),
|
),
|
||||||
|
|
||||||
// Entry point:
|
// Entry point:
|
||||||
gated!(unix_sigpipe, Normal, template!(Word, NameValueStr: "inherit|sig_ign|sig_dfl"), ErrorFollowing, experimental!(unix_sigpipe)),
|
|
||||||
ungated!(start, Normal, template!(Word), WarnFollowing),
|
ungated!(start, Normal, template!(Word), WarnFollowing),
|
||||||
ungated!(no_start, CrateLevel, template!(Word), WarnFollowing),
|
ungated!(no_start, CrateLevel, template!(Word), WarnFollowing),
|
||||||
ungated!(no_main, CrateLevel, template!(Word), WarnFollowing),
|
ungated!(no_main, CrateLevel, template!(Word), WarnFollowing),
|
||||||
|
|
|
@ -6,8 +6,8 @@ use base_db::salsa::Cycle;
|
||||||
use chalk_ir::{AdtId, FloatTy, IntTy, TyKind, UintTy};
|
use chalk_ir::{AdtId, FloatTy, IntTy, TyKind, UintTy};
|
||||||
use hir_def::{
|
use hir_def::{
|
||||||
layout::{
|
layout::{
|
||||||
Abi, FieldsShape, Integer, LayoutCalculator, LayoutS, Primitive, ReprOptions, Scalar, Size,
|
Abi, FieldsShape, Float, Integer, LayoutCalculator, LayoutS, Primitive, ReprOptions,
|
||||||
StructKind, TargetDataLayout, WrappingRange,
|
Scalar, Size, StructKind, TargetDataLayout, WrappingRange,
|
||||||
},
|
},
|
||||||
LocalFieldId, StructId,
|
LocalFieldId, StructId,
|
||||||
};
|
};
|
||||||
|
@ -264,10 +264,10 @@ pub fn layout_of_ty_query(
|
||||||
),
|
),
|
||||||
chalk_ir::Scalar::Float(f) => scalar(
|
chalk_ir::Scalar::Float(f) => scalar(
|
||||||
dl,
|
dl,
|
||||||
match f {
|
Primitive::Float(match f {
|
||||||
FloatTy::F32 => Primitive::F32,
|
FloatTy::F32 => Float::F32,
|
||||||
FloatTy::F64 => Primitive::F64,
|
FloatTy::F64 => Float::F64,
|
||||||
},
|
}),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
TyKind::Tuple(len, tys) => {
|
TyKind::Tuple(len, tys) => {
|
||||||
|
|
|
@ -3869,7 +3869,7 @@ use std::ops::{Coroutine, CoroutineState};
|
||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let mut coroutine = || {
|
let mut coroutine = #[coroutine] || {
|
||||||
yield 1;
|
yield 1;
|
||||||
return "foo"
|
return "foo"
|
||||||
};
|
};
|
||||||
|
@ -3901,7 +3901,7 @@ use std::ops::Coroutine;
|
||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let mut coroutine = || {
|
let mut coroutine = #[coroutine] || {
|
||||||
println!("2");
|
println!("2");
|
||||||
yield;
|
yield;
|
||||||
println!("4");
|
println!("4");
|
||||||
|
@ -4007,7 +4007,7 @@ use std::pin::Pin;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let ret = "foo";
|
let ret = "foo";
|
||||||
let mut coroutine = move || {
|
let mut coroutine = #[coroutine] move || {
|
||||||
yield 1;
|
yield 1;
|
||||||
return ret
|
return ret
|
||||||
};
|
};
|
||||||
|
|
|
@ -178,7 +178,7 @@ impl<'a> Converter<'a> {
|
||||||
rustc_lexer::TokenKind::Ident => {
|
rustc_lexer::TokenKind::Ident => {
|
||||||
SyntaxKind::from_keyword(token_text).unwrap_or(IDENT)
|
SyntaxKind::from_keyword(token_text).unwrap_or(IDENT)
|
||||||
}
|
}
|
||||||
rustc_lexer::TokenKind::InvalidIdent => {
|
rustc_lexer::TokenKind::InvalidPrefix | rustc_lexer::TokenKind::InvalidIdent => {
|
||||||
err = "Ident contains invalid characters";
|
err = "Ident contains invalid characters";
|
||||||
IDENT
|
IDENT
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue