Skip to content

Commit ad14514

Browse files
bors[bot]lnicola
andauthored
Merge #7739
7739: Bump deps r=lnicola a=lnicola Closes #7273 bors r+ Co-authored-by: Laurențiu Nicola <[email protected]>
2 parents 238f3a5 + 6515f1b commit ad14514

File tree

4 files changed

+147
-29
lines changed

4 files changed

+147
-29
lines changed

Cargo.lock

Lines changed: 52 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/hir_ty/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ ena = "0.14.0"
1717
log = "0.4.8"
1818
rustc-hash = "1.1.0"
1919
scoped-tls = "1"
20-
chalk-solve = { version = "0.56", default-features = false }
21-
chalk-ir = "0.56"
22-
chalk-recursive = "0.56"
20+
chalk-solve = { version = "0.58", default-features = false }
21+
chalk-ir = "0.58"
22+
chalk-recursive = "0.58"
2323
la-arena = { version = "0.2.0", path = "../../lib/arena" }
2424

2525
stdx = { path = "../stdx", version = "0.0.0" }

crates/hir_ty/src/tests/method_resolution.rs

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,97 @@ fn test() { foo.call(); }
955955
);
956956
}
957957

958+
#[test]
959+
fn super_trait_assoc_type_impl_return() {
960+
check_infer(
961+
r#"
962+
trait Base {
963+
type Item;
964+
fn foo(self) -> Self::Item;
965+
}
966+
967+
trait Super : Base {}
968+
969+
fn base1() -> impl Base<Item = usize> { loop {} }
970+
fn super1() -> impl Super<Item = usize> { loop {} }
971+
972+
fn test(base2: impl Base<Item = usize>, super2: impl Super<Item = usize>) {
973+
base1().foo();
974+
super1().foo();
975+
base2.foo();
976+
super2.foo();
977+
}
978+
"#,
979+
expect![[r#"
980+
39..43 'self': Self
981+
124..135 '{ loop {} }': !
982+
126..133 'loop {}': !
983+
131..133 '{}': ()
984+
176..187 '{ loop {} }': !
985+
178..185 'loop {}': !
986+
183..185 '{}': ()
987+
197..202 'base2': impl Base<Item = usize>
988+
229..235 'super2': impl Super<Item = usize>
989+
263..340 '{ ...o(); }': ()
990+
269..274 'base1': fn base1() -> impl Base<Item = usize>
991+
269..276 'base1()': impl Base<Item = usize>
992+
269..282 'base1().foo()': usize
993+
288..294 'super1': fn super1() -> impl Super<Item = usize>
994+
288..296 'super1()': impl Super<Item = usize>
995+
288..302 'super1().foo()': usize
996+
308..313 'base2': impl Base<Item = usize>
997+
308..319 'base2.foo()': usize
998+
325..331 'super2': impl Super<Item = usize>
999+
325..337 'super2.foo()': usize
1000+
"#]],
1001+
);
1002+
}
1003+
1004+
#[test]
1005+
fn super_trait_impl_return_trait_method_resolution() {
1006+
check_infer(
1007+
r#"
1008+
trait Base {
1009+
fn foo(self) -> usize;
1010+
}
1011+
1012+
trait Super : Base {}
1013+
1014+
fn base1() -> impl Base { loop {} }
1015+
fn super1() -> impl Super { loop {} }
1016+
1017+
fn test(base2: impl Base, super2: impl Super) {
1018+
base1().foo();
1019+
super1().foo();
1020+
base2.foo();
1021+
super2.foo();
1022+
}
1023+
"#,
1024+
expect![[r#"
1025+
24..28 'self': Self
1026+
90..101 '{ loop {} }': !
1027+
92..99 'loop {}': !
1028+
97..99 '{}': ()
1029+
128..139 '{ loop {} }': !
1030+
130..137 'loop {}': !
1031+
135..137 '{}': ()
1032+
149..154 'base2': impl Base
1033+
167..173 'super2': impl Super
1034+
187..264 '{ ...o(); }': ()
1035+
193..198 'base1': fn base1() -> impl Base
1036+
193..200 'base1()': impl Base
1037+
193..206 'base1().foo()': usize
1038+
212..218 'super1': fn super1() -> impl Super
1039+
212..220 'super1()': impl Super
1040+
212..226 'super1().foo()': usize
1041+
232..237 'base2': impl Base
1042+
232..243 'base2.foo()': usize
1043+
249..255 'super2': impl Super
1044+
249..261 'super2.foo()': usize
1045+
"#]],
1046+
);
1047+
}
1048+
9581049
#[test]
9591050
fn method_resolution_non_parameter_type() {
9601051
check_types(

crates/syntax/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ doctest = false
1313
[dependencies]
1414
itertools = "0.10.0"
1515
rowan = "0.12.2"
16-
rustc_lexer = { version = "705.0.0", package = "rustc-ap-rustc_lexer" }
16+
rustc_lexer = { version = "707.0.0", package = "rustc-ap-rustc_lexer" }
1717
rustc-hash = "1.1.0"
1818
arrayvec = "0.5.1"
1919
once_cell = "1.3.1"

0 commit comments

Comments
 (0)