Nicholas Nethercote
4143b101f9
Use ThinVec
in various AST types.
...
This commit changes the sequence parsers to produce `ThinVec`, which
triggers numerous conversions.
2023-02-21 11:51:56 +11:00
Nicholas Nethercote
6a56c3a930
Use ThinVec
in ast::Impl
and related types.
2023-02-21 11:51:55 +11:00
Nicholas Nethercote
068db466e8
Use ThinVec
in ast::WhereClause
.
2023-02-21 11:51:55 +11:00
Nicholas Nethercote
dd7aff5cc5
Use ThinVec
in ast::Generics
and related types.
2023-02-21 11:51:55 +11:00
Nicholas Nethercote
06228d6e93
Upgrade thin-vec
from 0.2.9 to 0.2.12.
...
Because 0.2.10 added supports for `ThinVec::splice`, and 0.2.12 is the
latest release.
2023-02-21 11:51:55 +11:00
Michael Goulet
eb1f9babec
Add test for bad cast with deferred projection equality
2023-02-21 00:07:06 +00:00
Michael Goulet
2895731e5e
Name placeholder in some region errors
2023-02-21 00:00:49 +00:00
Boxy
4f2001aab7
remove flag
2023-02-20 23:43:29 +00:00
Matt Harding
ec9a4ce19e
Explain the default panic hook better
...
This changes the documentation of `std::panic::set_hook` and `take_hook` to better explain how the default panic hook works. In particular the fact that `take_hook` registers the default hook, rather than no hook at all, was missing from the docs.
2023-02-20 23:37:19 +00:00
Milo Moisson
18f5f0c473
use UpperCamelCase
2023-02-20 23:44:21 +01:00
bors
8f55d6025f
Auto merge of #108286 - matthiaskrgr:rollup-dwy99rf, r=matthiaskrgr
...
Rollup of 6 pull requests
Successful merges:
- #108241 (Fix handling of reexported macro in doc hidden items)
- #108254 (Refine error span for trait error into borrowed expression)
- #108255 (Remove old FIXMEs referring to #19596 )
- #108257 (Remove old FIXME that no longer applies)
- #108276 (small `opaque_type_origin` cleanup)
- #108279 (Use named arguments for `{,u}int_impls` macro)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2023-02-20 22:01:48 +00:00
b-naber
c9843d6144
remove cfg attributes
2023-02-20 22:00:30 +00:00
Matthias Krüger
4f532dacfc
Rollup merge of #108279 - Nilstrieb:int, r=scottmcm
...
Use named arguments for `{,u}int_impls` macro
This makes it way easier to understand.
r? `@scottmcm`
2023-02-20 22:12:20 +01:00
Matthias Krüger
ea7ca705e6
Rollup merge of #108276 - lcnr:opaque-tys, r=oli-obk
...
small `opaque_type_origin` cleanup
r? `@oli-obk`
2023-02-20 22:12:20 +01:00
Matthias Krüger
02842d4f69
Rollup merge of #108257 - fee1-dead-contrib:fixme-1, r=tmiasko
...
Remove old FIXME that no longer applies
it looks like Encodable was fallible at some point, but that was changed which means that this FIXME is no longer applicable
2023-02-20 22:12:19 +01:00
Matthias Krüger
7022ae4f8c
Rollup merge of #108255 - fee1-dead-contrib:fix-old-fixme, r=cjgillot
...
Remove old FIXMEs referring to #19596
Having an inner function that accepts a mutable reference seems to be the only way this can be expressed. Taking a mutable reference would call the same function with a new type &mut F which then causes the infinite recursion error in #19596 .
2023-02-20 22:12:18 +01:00
Matthias Krüger
194d52cc18
Rollup merge of #108254 - Nathan-Fenner:nathanf/error-span-ref-trait-refine, r=WaffleLapkin
...
Refine error span for trait error into borrowed expression
Extends the error span refinement in #106477 to drill into borrowed expressions just like tuples/struct/enum literals. For example,
```rs
trait Fancy {}
trait Good {}
impl <'a, T> Fancy for &'a T where T: Good {}
impl <S> Good for Option<S> where S: Iterator {}
fn want_fancy<F>(f: F) where F: Fancy {}
fn example() {
want_fancy(&Some(5));
// (BEFORE) ^^^^^^^^ `{integer}` is not an iterator
// (AFTER) ^ `{integer}` is not an iterator
}
```
Existing heuristics try to find the right part of the expression to "point at"; current heuristics look at e.g. struct constructors and tuples. This PR adds a new check for borrowed expressions when looking into a borrowed type.
2023-02-20 22:12:18 +01:00
Matthias Krüger
52fa8fe376
Rollup merge of #108241 - GuillaumeGomez:fix-reexported-macro-handling, r=notriddle
...
Fix handling of reexported macro in doc hidden items
Fixes https://github.com/rust-lang/rust/issues/108231 .
Fixes #59368 .
r? `@notriddle`
2023-02-20 22:12:17 +01:00
Guillaume Gomez
fc6a05c463
Add test for reexported hidden macro
2023-02-20 20:19:21 +01:00
Guillaume Gomez
e2d9dee9eb
Add regression test for #108231
2023-02-20 20:19:21 +01:00
Guillaume Gomez
24b23aa958
Fix handling of reexported macro in doc hidden items
2023-02-20 20:19:21 +01:00
bors
5243ea5c29
Auto merge of #108260 - lnicola:rust-analyzer-2023-02-20, r=lnicola
...
⬆️ rust-analyzer
r? `@ghost`
2023-02-20 19:04:51 +00:00
Camille GILLOT
f02d6c45e1
Remove use_ecx.
2023-02-20 18:25:37 +00:00
Camille GILLOT
d0934f14c7
Merge if-let and match.
2023-02-20 18:25:37 +00:00
Camille GILLOT
4a75995fbd
Move state fixup into a different method.
2023-02-20 18:25:37 +00:00
Nilstrieb
eb5d82bc9c
Use named arguments for int_impl
macro
...
This makes it easier to understand.
2023-02-20 18:18:49 +00:00
Nilstrieb
d3b46bb74e
Use named arguments for uint_impl
macro
...
This makes it easier to understand.
2023-02-20 18:10:51 +00:00
lcnr
f97a8f017d
small opaque_type_origin
cleanup
2023-02-20 18:00:57 +01:00
bors
8973049549
Auto merge of #108268 - matthiaskrgr:rollup-4tdvnx6, r=matthiaskrgr
...
Rollup of 5 pull requests
Successful merges:
- #108124 (Document that CStr::as_ptr returns a type alias)
- #108171 (Improve building compiler artifacts output)
- #108200 (Use restricted Damerau-Levenshtein distance for diagnostics)
- #108259 (remove FIXME that doesn't require fixing)
- #108265 ("`const` generic" -> "const parameter")
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2023-02-20 16:19:06 +00:00
Milo Moisson
76ac2705a5
docs: wrong naming convention in struct keyword doc
2023-02-20 16:40:46 +01:00
Oli Scherer
0847b79ada
Remove ResolverTree
2023-02-20 15:28:59 +00:00
Oli Scherer
2a47113efa
Remove IntoDefIdTree
2023-02-20 15:28:59 +00:00
Oli Scherer
1ab14ea7c2
Remove some unnecessary tcx-passing
2023-02-20 15:28:59 +00:00
Oli Scherer
acbcfaaf7b
Stop passing in values that one can also get from the tcx lazily
2023-02-20 15:28:59 +00:00
Oli Scherer
c3522d0637
Move the resolver into a query
2023-02-20 15:28:59 +00:00
Oli Scherer
37e2f4f487
Make configure_and_expand
"infalllible" by just aborting the compilation if it fails instead of bubbling out an error
2023-02-20 15:28:59 +00:00
Oli Scherer
63c8d00090
Use tcx queries instead of passing the values to configure_and_expand
.
2023-02-20 15:28:59 +00:00
Oli Scherer
1202fce40e
Remove definitions field that is only needed for one method
2023-02-20 15:28:59 +00:00
Oli Scherer
4953d70e2f
Stuff a TyCtxt into the Resolver
2023-02-20 15:28:59 +00:00
Oli Scherer
9fb91b8742
Remove a redundant function argument
2023-02-20 15:28:58 +00:00
Oli Scherer
8f132d8549
Run the resolver after TyCtxt construction
2023-02-20 15:28:58 +00:00
Oli Scherer
6924e3c374
Make untracked.source_span lockable so that resolution can still write to it when using TyCtxt
2023-02-20 15:28:58 +00:00
Oli Scherer
ade3dceb38
Make untracked.cstore lockable so that resolution can still write to it when using TyCtxt
2023-02-20 15:28:58 +00:00
Oli Scherer
054c76d658
Revert most of the custom place computation, it was unnecessary.
2023-02-20 14:56:44 +00:00
Oli Scherer
82f1e341a3
Remove commented out code
2023-02-20 14:11:38 +00:00
Oli Scherer
472059d854
Deduplicate some logic between dyn* and dyn
2023-02-20 14:11:38 +00:00
Ralf Jung
ad6dd60396
fix Stacked Borrows interaction with dyn*
2023-02-20 15:08:05 +01:00
Ralf Jung
57056d7f8f
slightly beef up dyn-star-to-dyn test
2023-02-20 15:08:05 +01:00
Ralf Jung
b2f58146b9
basic dyn* support for Miri
2023-02-20 15:08:05 +01:00
Matthias Krüger
e4dadd6416
Rollup merge of #108265 - lcnr:cg-error-msg, r=BoxyUwU
...
"`const` generic" -> "const parameter"
2023-02-20 14:32:56 +01:00