Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆️ rust-analyzer #100049

Merged
merged 43 commits into from
Aug 3, 2022
Merged
Changes from 2 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
e45a250
fix: Insert spaces when inlining a function defined in a macro.
zachs18 Jul 25, 2022
b1e3daf
Find standalone proc-macro-srv on windows too
fasterthanlime Jul 26, 2022
1c75284
Auto merge of #12878 - fasterthanlime:standalone-pms-exe, r=lnicola
bors Jul 26, 2022
c8ff70e
fix: Fix server panicking on project loading when proc-macros are dis…
Veykril Jul 26, 2022
7a30f62
Auto merge of #12881 - Veykril:proc-srv, r=Veykril
bors Jul 26, 2022
add33b6
Remove FIXME comment for unreachable fallback.
zachs18 Jul 26, 2022
c2eebd7
Auto merge of #12877 - zachs18:inline-def-in-macro, r=zachs18
bors Jul 26, 2022
6c379b9
fix: Fix Semantics::original_ast_node not caching the resulting file
Veykril Jul 27, 2022
8e4d9b8
Auto merge of #12886 - Veykril:sema-cache, r=Veykril
bors Jul 27, 2022
1f8daa1
fix: Honor ref expressions for compute_ref_match completions
Veykril Jul 27, 2022
cb32e26
Auto merge of #12887 - Veykril:compl-pref-fix, r=Veykril
bors Jul 27, 2022
349dfc7
Find original ast node before compute ref match in fn render
Rustin170506 Jul 27, 2022
b4d652a
Auto merge of #12830 - hi-rustin:rustin-patch-issue-12717-fix, r=Veykril
bors Jul 27, 2022
bf893d5
internal: Assume condition/iterable is missing if there is only a Blo…
Veykril Jul 27, 2022
9a1ec45
Auto merge of #12890 - Veykril:syntax-blocks, r=Veykril
bors Jul 27, 2022
f83738e
Use large stack on expander thread
umanwizard Jul 27, 2022
4087535
Auto merge of #12891 - brennanvincent:expander_stack, r=lnicola
bors Jul 27, 2022
e782e59
fix: Calculate completions after type anchors
Veykril Jul 28, 2022
02f9ec4
Auto merge of #12895 - Veykril:compl-anchor, r=Veykril
bors Jul 28, 2022
7c59d7c
fix: Fix pattern completions adding unnecessary braces
Veykril Jul 28, 2022
02c240f
Auto merge of #12898 - Veykril:compl-pat-brace, r=Veykril
bors Jul 28, 2022
74abd44
fix: Do completions in path qualifier position
Veykril Jul 28, 2022
5986d21
Auto merge of #12899 - Veykril:compl-qualifier, r=Veykril
bors Jul 28, 2022
8658425
publish: Use cargo ws rename to rename crates
pksunkara Jul 28, 2022
af2b806
Auto merge of #12900 - pksunkara:master, r=lnicola
bors Jul 28, 2022
ce75412
fix: Don't complete marker traits in expression position
Veykril Jul 28, 2022
32e640e
Auto merge of #12901 - Veykril:completion-trait-expr, r=Veykril
bors Jul 28, 2022
f867ddc
fix: Order ItemScope::entries results
Veykril Jul 28, 2022
b8763fe
Auto merge of #12902 - Veykril:item-scope, r=Veykril
bors Jul 28, 2022
948c9af
Only run rainbow highlighting test on 64-bit Unix
lnicola Jul 28, 2022
cab1055
Auto merge of #12903 - lnicola:rainbows, r=Veykril
bors Jul 28, 2022
11ef494
Be more explicit when filtering built-in completions
lnicola Jul 28, 2022
ec3586e
Auto merge of #12904 - lnicola:completion-builtin-filter, r=lnicola
bors Jul 28, 2022
902fd6d
fix: complete path of existing record expr
cynecx Jul 29, 2022
fb5e496
Auto merge of #12906 - cynecx:fix-completions, r=Veykril
bors Jul 29, 2022
618cfd7
fix: Fix ast-id up when merging raw attributes
Veykril Jul 30, 2022
e0ff4be
Auto merge of #12913 - Veykril:attr-merge, r=Veykril
bors Jul 30, 2022
58c3a56
Update xtask promote and release instructions
lnicola Jul 31, 2022
d31f360
Properly cfg the `max` field of Limit
Veykril Jul 31, 2022
3b2ecf4
Give variables more descriptive names
Veykril Jul 31, 2022
af64662
Auto merge of #12916 - Veykril:nits, r=Veykril
bors Jul 31, 2022
2b472f6
Auto merge of #12915 - lnicola:promote-subtree, r=lnicola
bors Jul 31, 2022
30a3706
:arrow_up: rust-analyzer
lnicola Aug 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions crates/hir-def/src/item_scope.rs
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ use std::collections::hash_map::Entry;

use base_db::CrateId;
use hir_expand::{name::Name, AstId, MacroCallId};
use itertools::Itertools;
use once_cell::sync::Lazy;
use profile::Count;
use rustc_hash::{FxHashMap, FxHashSet};
@@ -97,15 +98,14 @@ pub(crate) enum BuiltinShadowMode {
impl ItemScope {
pub fn entries<'a>(&'a self) -> impl Iterator<Item = (&'a Name, PerNs)> + 'a {
// FIXME: shadowing
let keys: FxHashSet<_> = self
.types
self.types
.keys()
.chain(self.values.keys())
.chain(self.macros.keys())
.chain(self.unresolved.iter())
.collect();

keys.into_iter().map(move |name| (name, self.get(name)))
.sorted()
.unique()
.map(move |name| (name, self.get(name)))
}

pub fn declarations(&self) -> impl Iterator<Item = ModuleDefId> + '_ {
10 changes: 5 additions & 5 deletions crates/ide-assists/src/handlers/expand_glob_import.rs
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ use crate::{
// pub struct Baz;
// }
//
// use foo::{Baz, Bar};
// use foo::{Bar, Baz};
//
// fn qux(bar: Bar, baz: Baz) {}
// ```
@@ -281,7 +281,7 @@ mod foo {
pub fn f() {}
}

use foo::{Baz, Bar, f};
use foo::{Bar, Baz, f};

fn qux(bar: Bar, baz: Baz) {
f();
@@ -351,7 +351,7 @@ mod foo {
pub fn f() {}
}

use foo::{Baz, Bar, f};
use foo::{Bar, Baz, f};

fn qux(bar: Bar, baz: Baz) {
f();
@@ -440,7 +440,7 @@ mod foo {
}
}

use foo::{bar::{Baz, Bar, f}, baz::*};
use foo::{bar::{Bar, Baz, f}, baz::*};

fn qux(bar: Bar, baz: Baz) {
f();
@@ -561,7 +561,7 @@ mod foo {

use foo::{
bar::{*, f},
baz::{g, qux::{q, h}}
baz::{g, qux::{h, q}}
};

fn qux(bar: Bar, baz: Baz) {
2 changes: 1 addition & 1 deletion crates/ide-assists/src/tests/generated.rs
Original file line number Diff line number Diff line change
@@ -535,7 +535,7 @@ mod foo {
pub struct Baz;
}

use foo::{Baz, Bar};
use foo::{Bar, Baz};

fn qux(bar: Bar, baz: Baz) {}
"#####,
22 changes: 11 additions & 11 deletions crates/ide-completion/src/render.rs
Original file line number Diff line number Diff line change
@@ -1271,8 +1271,8 @@ fn main() {
st S []
st &mut S [type]
st S []
fn main() []
fn foo(…) []
fn main() []
"#]],
);
check_relevance(
@@ -1288,8 +1288,8 @@ fn main() {
lc s [type+name+local]
st S [type]
st S []
fn main() []
fn foo(…) []
fn main() []
"#]],
);
check_relevance(
@@ -1305,8 +1305,8 @@ fn main() {
lc ssss [type+local]
st S [type]
st S []
fn main() []
fn foo(…) []
fn main() []
"#]],
);
}
@@ -1342,10 +1342,10 @@ fn main() {
lc &t [type+local]
st S []
st &S [type]
st T []
st S []
fn main() []
st T []
fn foo(…) []
fn main() []
md core []
"#]],
)
@@ -1388,10 +1388,10 @@ fn main() {
lc &mut t [type+local]
st S []
st &mut S [type]
st T []
st S []
fn main() []
st T []
fn foo(…) []
fn main() []
md core []
"#]],
)
@@ -1483,12 +1483,12 @@ fn main() {
expect![[r#"
st S []
st &S [type]
st T []
st S []
fn main() []
st T []
fn bar() []
fn &bar() [type]
fn foo(…) []
fn main() []
md core []
"#]],
)
@@ -1633,8 +1633,8 @@ fn foo() {
ev Foo::B [type_could_unify]
fn foo() []
en Foo []
fn baz() []
fn bar() []
fn baz() []
"#]],
);
}
@@ -1724,9 +1724,9 @@ fn f() {
}
"#,
expect![[r#"
md std []
st Buffer []
fn f() []
md std []
tt BufRead (use std::io::BufRead) [requires_import]
st BufReader (use std::io::BufReader) [requires_import]
st BufWriter (use std::io::BufWriter) [requires_import]