rust/compiler/rustc_resolve/src
Matthias Krüger 68a44c8228
Rollup merge of #90856 - ken-matsui:suggestion-to-wrap-vec-allocator-api-in-tuple, r=davidtwco
Suggestion to wrap inner types using 'allocator_api' in tuple

This PR provides a suggestion to wrap the inner types in tuple when being along with 'allocator_api'.

Closes https://github.com/rust-lang/rust/issues/83250

```rust
fn main() {
    let _vec: Vec<u8, _> = vec![]; //~ ERROR use of unstable library feature 'allocator_api'
}
```

```diff
 error[E0658]: use of unstable library feature 'allocator_api'
   --> $DIR/suggest-vec-allocator-api.rs:2:23
    |
 LL |     let _vec: Vec<u8, _> = vec![];
-   |                       ^
+   |                   ----^
+   |                   |
+   |                   help: consider wrapping the inner types in tuple: `(u8, _)`
    |
    = note: see issue #32838 <https://github.com/rust-lang/rust/issues/32838> for more information
    = help: add `#![feature(allocator_api)]` to the crate attributes to enable
```
2021-11-23 19:28:06 +01:00
..
late rustc: Remove #[rustc_synthetic] 2021-11-18 14:32:29 +08:00
build_reduced_graph.rs Shorten Span of unused macro lints 2021-11-11 08:04:02 +01:00
check_unused.rs Add ty::Visibility::is_public() 2021-11-09 18:35:00 -08:00
def_collector.rs Record call_site parent for macros. 2021-09-10 20:19:25 +02:00
diagnostics.rs Fix case where ICE #90878 was still triggered by a leading newline 2021-11-16 22:16:47 +01:00
imports.rs Rollup merge of #90628 - ken-matsui:clarify-error-messages-caused-by-reexporting-pub-crate-visibility-to-outside, r=oli-obk 2021-11-20 10:21:13 +01:00
late.rs ast: Fix naming conventions in AST structures 2021-11-07 21:38:17 +08:00
lib.rs Stabilize format_args_capture 2021-11-15 10:14:29 +01:00
macros.rs Suggestion to wrap inner types using allocator_api in tuple 2021-11-24 00:24:13 +09:00