mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
Use statics + clone instead of const until const can access statics
This commit is contained in:
parent
dd626e78c7
commit
f2d51073d2
49 changed files with 389 additions and 362 deletions
|
@ -60,7 +60,7 @@ pub(super) fn lower_path(ctx: &LowerCtx<'_>, mut path: ast::Path) -> Option<Path
|
|||
segments.push(name);
|
||||
}
|
||||
ast::PathSegmentKind::SelfTypeKw => {
|
||||
segments.push(Name::new_symbol_root(sym::Self_));
|
||||
segments.push(Name::new_symbol_root(sym::Self_.clone()));
|
||||
}
|
||||
ast::PathSegmentKind::Type { type_ref, trait_ref } => {
|
||||
assert!(path.qualifier().is_none()); // this can only occur at the first segment
|
||||
|
@ -268,7 +268,7 @@ fn lower_generic_args_from_fn_path(
|
|||
let bindings = if let Some(ret_type) = ret_type {
|
||||
let type_ref = TypeRef::from_ast_opt(ctx, ret_type.ty());
|
||||
Box::new([AssociatedTypeBinding {
|
||||
name: Name::new_symbol_root(sym::Output),
|
||||
name: Name::new_symbol_root(sym::Output.clone()),
|
||||
args: None,
|
||||
type_ref: Some(type_ref),
|
||||
bounds: Box::default(),
|
||||
|
@ -277,7 +277,7 @@ fn lower_generic_args_from_fn_path(
|
|||
// -> ()
|
||||
let type_ref = TypeRef::Tuple(Vec::new());
|
||||
Box::new([AssociatedTypeBinding {
|
||||
name: Name::new_symbol_root(sym::Output),
|
||||
name: Name::new_symbol_root(sym::Output.clone()),
|
||||
args: None,
|
||||
type_ref: Some(type_ref),
|
||||
bounds: Box::default(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue