about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-06-29 20:35:04 +0200
committerGitHub <noreply@github.com>2022-06-29 20:35:04 +0200
commit7dedec7be7288dfcdb4929b91962c76099d4dadf (patch)
tree747d77b9a1520bb8f47547c2b4ec1343e078a3c0 /compiler/rustc_parse/src
parent2c702c2f17a12fe0c9e6bc224788dacc96bf261e (diff)
parent60dc54e29e2589ad21413db8f81518174b2fe604 (diff)
downloadrust-7dedec7be7288dfcdb4929b91962c76099d4dadf.tar.gz
rust-7dedec7be7288dfcdb4929b91962c76099d4dadf.zip
Rollup merge of #98652 - ojeda:warning-free-no_global_oom_handling, r=joshtriplett
`alloc`: clean and ensure `no_global_oom_handling`  builds are warning-free

Rust 1.62.0 introduced a couple new `unused_imports` warnings
in `no_global_oom_handling` builds, making a total of 5 warnings.

<details>

```txt
warning: unused import: `Unsize`
 --> library/alloc/src/boxed/thin.rs:6:33
  |
6 | use core::marker::{PhantomData, Unsize};
  |                                 ^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `from_fn`
  --> library/alloc/src/string.rs:51:18
   |
51 | use core::iter::{from_fn, FusedIterator};
   |                  ^^^^^^^

warning: unused import: `core::ops::Deref`
  --> library/alloc/src/vec/into_iter.rs:12:5
   |
12 | use core::ops::Deref;
   |     ^^^^^^^^^^^^^^^^

warning: associated function `shrink` is never used
   --> library/alloc/src/raw_vec.rs:424:8
    |
424 |     fn shrink(&mut self, cap: usize) -> Result<(), TryReserveError> {
    |        ^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

warning: associated function `forget_remaining_elements` is never used
   --> library/alloc/src/vec/into_iter.rs:126:19
    |
126 |     pub(crate) fn forget_remaining_elements(&mut self) {
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^
```

</details>

This PR cleans them and ensures no new ones are introduced
so that projects compiling `alloc` without infallible allocations
do not see them (and may want to enable `-Dwarnings`).

The couple `dead_code` ones may be reverted when some fallible
allocation support starts using them.
Diffstat (limited to 'compiler/rustc_parse/src')
0 files changed, 0 insertions, 0 deletions