We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55d4813 commit 5c3a93cCopy full SHA for 5c3a93c
crates/ide_assists/src/handlers/extract_function.rs
@@ -601,10 +601,7 @@ impl FunctionBody {
601
if local_ref.is_self(sema.db) {
602
match local_ref.source(sema.db).value {
603
Either::Right(it) => {
604
- stdx::always!(
605
- self_param.replace(it).is_none(),
606
- "body references two different self params"
607
- );
+ self_param.replace(it);
608
}
609
Either::Left(_) => {
610
stdx::never!(
@@ -2369,7 +2366,7 @@ struct S { f: i32 };
2369
2366
2370
2367
impl S {
2371
2368
fn foo(&self) -> i32 {
2372
- $01+self.f$0
+ $0self.f+self.f$0
2373
2374
2375
"#,
@@ -2382,7 +2379,7 @@ impl S {
2382
2379
2383
2380
2384
2381
fn $0fun_name(&self) -> i32 {
2385
- 1+self.f
+ self.f+self.f
2386
2387
2388
0 commit comments