Commit Graph

87 Commits

Author SHA1 Message Date
bors
e0ef0fc392 Auto merge of #78779 - LeSeulArtichaut:ty-visitor-return, r=oli-obk
Introduce `TypeVisitor::BreakTy`

Implements MCP rust-lang/compiler-team#383.
r? `@ghost`
cc `@lcnr` `@oli-obk`

~~Blocked on FCP in rust-lang/compiler-team#383.~~
2020-11-17 12:24:34 +00:00
lcnr
a6cbd64dae words 2020-11-16 22:42:09 +01:00
Bastian Kauschke
2bf93bd852 compiler: fold by value 2020-11-16 22:34:57 +01:00
LeSeulArtichaut
df6e87cc85 Use TypeVisitor::BreakTy in UnresolvedTypeFinder 2020-11-14 21:20:10 +01:00
LeSeulArtichaut
e0f3119103 Introduce TypeVisitor::BreakTy 2020-11-14 20:25:27 +01:00
Guillaume Gomez
0b7a7930b4
Rollup merge of #78463 - varkor:placeholder-const, r=nikomatsakis
Add type to `ConstKind::Placeholder`

I simply threaded `<'tcx>` through everything that required it. I'm not sure whether this is the correct thing to do, but it seems to work.

r? `@nikomatsakis`
2020-11-13 15:26:14 +01:00
varkor
e24a4b4690 Add type to ConstKind::Placeholder 2020-11-12 15:39:55 +00:00
Jonas Schievink
9596e34ad4
Rollup merge of #76765 - guswynn:async_return, r=tmandry
Make it more clear what an about async fn's returns when referring to what it returns

see #76547

This is *likely* not the ONLY place that this happens to be unclear, but we can move this fn to rustc_middle or something like that and reuse it if need be, to apply it to more diagnostics

One outstanding question I have is, if the fn returns (), should I make the message more clear (what about `fn f()` vs `fn f() -> ()`, can you tell those apart in the hir?)

R? `@tmandry`

`@rustbot` modify labels +A-diagnostics +T-compiler
2020-11-10 14:45:09 +01:00
Matthias Krüger
bcd2f2df67 fix a couple of clippy warnings:
filter_next
manual_strip
redundant_static_lifetimes
single_char_pattern
unnecessary_cast
unused_unit
op_ref
redundant_closure
useless_conversion
2020-11-04 13:48:50 +01:00
LeSeulArtichaut
9433eb83fe Remove implicit Continue type 2020-10-30 12:27:47 +01:00
LeSeulArtichaut
4fe735b320 TypeVisitor: use ControlFlow in rustc_{infer,lint,trait_selection} 2020-10-30 12:27:34 +01:00
Yuki Okushi
a7a0538802
Rollup merge of #78460 - varkor:turbofish-string-generic, r=lcnr
Adjust turbofish help message for const generics

Types are no longer special. (This message arguably only makes sense with `min_const_generics` or more, but we'll be there soon.)

r? @lcnr
2020-10-29 12:08:50 +09:00
varkor
a6d01da716 Remove irrelevant FIXME 2020-10-28 10:47:27 +00:00
Esteban Küber
28f02fbf3e Suggest calling await on method call and field access
When encountering a failing method or field resolution on a `Future`,
look at the `Output` and try the same operation on it. If successful,
suggest calling `.await` on the `Future`.

This had already been introduced in #72784, but at some point they
stopped working.
2020-10-26 08:11:43 -07:00
Dylan DPC
463b6cc0e1
Rollup merge of #78268 - JohnTitor:issue-78262, r=estebank
Do not try to report on closures to avoid ICE

Fixes #78262
2020-10-26 03:09:11 +01:00
Yuki Okushi
7b4c397b73 Do not try to report on closures to avoid ICE 2020-10-25 11:19:49 +09:00
Esteban Küber
f5d7443a6b Suggest semicolon removal and boxing when appropriate 2020-10-23 08:06:41 -07:00
Esteban Küber
c5485115dc Add more .await suggestions on E0308 2020-10-23 08:06:41 -07:00
Esteban Küber
62ba365195 Review comments: use newtype instead of bool 2020-10-23 08:06:41 -07:00
Esteban Küber
671d7c4afb Account for possible boxable impl Future in semicolon removal suggestions 2020-10-23 08:06:13 -07:00
David Tolnay
b0059500f6
Reduce diagram mess in 'match arms have incompatible types' error 2020-10-22 16:16:02 -07:00
Bastian Kauschke
8752a560b9 Lift: take self by value 2020-10-21 23:59:35 +02:00
Esteban Küber
88f5e110db review comments 2020-10-20 09:26:15 -07:00
Esteban Küber
ae0e3d0511 Tweak "object unsafe" errors
Fix #77598.
2020-10-20 09:26:14 -07:00
SNCPlay42
c146e8c54f revert workaround #73027 2020-10-19 21:11:40 +01:00
Gus Wynn
20e032e650 Make it more clear when complaining about async fn's return types 2020-10-17 15:57:47 -07:00
Jack Huey
f6a53b4c69 Review comments 2020-10-16 15:14:38 -04:00
Jack Huey
eba10270c6 map_bound_ref -> rebind 2020-10-16 14:29:21 -04:00
Jack Huey
dd5c9bf139 Use map_bound(_ref) instead of Binder::bind when possible 2020-10-16 12:58:50 -04:00
est31
9ed2177d86 Remove unused code from rustc_infer 2020-10-14 04:14:32 +02:00
est31
a0fc455d30 Replace absolute paths with relative ones
Modern compilers allow reaching external crates
like std or core via relative paths in modules
outside of lib.rs and main.rs.
2020-10-13 14:16:45 +02:00
Matthew Jasper
d4d9e7f67f Remove unused part of return value from replace_bound_vars_with_placeholders 2020-10-06 11:19:30 +01:00
Matthew Jasper
f958e6c246 Separate bounds and predicates for associated/opaque types 2020-10-06 11:19:29 +01:00
Matthew Jasper
0eb87ed55f Rename projection_predicates to item_bounds 2020-10-06 11:18:45 +01:00
bors
ea7e131435 Auto merge of #77171 - VFLashM:better_sso_structures, r=oli-obk
Better sso structures

This change greatly expands interface of MiniSet/MiniMap and renames them because they are no longer "Mini".
2020-10-05 17:18:01 +00:00
Dylan MacKenzie
c4d8089f00 Revert "Add an unused field of type Option<DefId> to ParamEnv struct."
This reverts commit ab83d372ed.
2020-09-26 21:01:09 -07:00
Valerii Lashmanov
5c224a484d MiniSet/MiniMap moved and renamed into SsoHashSet/SsoHashMap
It is a more descriptive name and with upcoming changes
there will be nothing "mini" about them.
2020-09-26 14:30:05 -05:00
Ralf Jung
9e02642fb3
Rollup merge of #77211 - est31:remove_unused_allow, r=oli-obk
Remove unused #[allow(...)] statements from compiler/
2020-09-26 12:58:34 +02:00
Ralf Jung
ac8169dc10
Rollup merge of #77093 - lcnr:const-generics-infer-warning, r=varkor
merge `need_type_info_err(_const)`

I hoped that this would automatically solve #76737 but it doesn't quite seem like it

fixes #77092

r? @varkor
2020-09-26 12:58:17 +02:00
Bastian Kauschke
9a607c0a27 unused into 2020-09-26 10:31:34 +02:00
Bastian Kauschke
32195ac8f4 rename functions 2020-09-26 10:28:15 +02:00
est31
12187b7f86 Remove unused #[allow(...)] statements from compiler/ 2020-09-26 01:25:55 +02:00
marmeladema
9f50c49117 Implement Display for DisambiguatedDefPathData and DefPathData 2020-09-25 22:46:15 +01:00
marmeladema
f1878d19fa Move from {{closure}}#0 syntax to {closure#0} for (def) path components 2020-09-25 22:46:14 +01:00
Jonas Schievink
6f3da3d53f
Rollup merge of #77121 - duckymirror:html-root-url, r=jyn514
Updated html_root_url for compiler crates

Closes #77103

r? @jyn514
2020-09-25 02:29:45 +02:00
Bastian Kauschke
e5430e5306 the two hardest things in programming, names and... 2020-09-24 22:01:46 +02:00
Erik Hofmayer
138a2e5eaa /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
Erik Hofmayer
dd66ea2d3d Updated html_root_url for compiler crates 2020-09-23 21:14:43 +02:00
Bastian Kauschke
0e84b61053 use relevant span when unifying ConstVarValues 2020-09-23 11:00:44 +02:00
Bastian Kauschke
3dbfdb0182 use the correct span when dealing with inference variables 2020-09-23 10:44:11 +02:00