rust/compiler/rustc_span/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
..
analyze_source_file remove redundant closures (clippy::redundant_closure) 2021-01-03 13:34:24 +01:00
lev_distance Suggest a case insensitive match name regardless of levenshtein distance 2021-10-17 04:51:22 +09:00
source_map Split span_to_string into span_to_diagnostic/embeddable_string 2021-05-11 00:04:12 +01:00
symbol Move the Lock into symbol::Interner 2021-09-15 18:46:45 +02:00
analyze_source_file.rs Fix some clippy lints 2020-12-03 17:08:19 -05:00
caching_source_map_view.rs Convert debug_assert to assert in CachingSourceMapView 2021-09-17 12:01:29 -05:00
def_id.rs Encode ExpnId using ExpnHash for incr. comp. 2021-07-17 19:41:08 +02:00
edition.rs Update LATEST_STABLE_EDITION to 2021. 2021-08-30 15:33:09 +02:00
fatal_error.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
hygiene.rs Simplify for loop desugar 2021-11-21 08:15:21 -06:00
lev_distance.rs Suggest a case insensitive match name regardless of levenshtein distance 2021-10-17 04:51:22 +09:00
lib.rs Simplify for loop desugar 2021-11-21 08:15:21 -06:00
source_map.rs Add SourceMap::indentation_before. 2021-11-16 19:52:58 +01:00
span_encoding.rs Rename decode to data_untracked. 2021-09-10 20:18:22 +02:00
symbol.rs Rollup merge of #90856 - ken-matsui:suggestion-to-wrap-vec-allocator-api-in-tuple, r=davidtwco 2021-11-23 19:28:06 +01:00
tests.rs Inline implementation of lookup_line 2021-07-08 23:30:53 +02:00