Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

ices/96288.sh: fixed with errors #1448

Merged
merged 1 commit into from
Oct 18, 2022
Merged

ices/96288.sh: fixed with errors #1448

merged 1 commit into from
Oct 18, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#96288

#!/bin/bash

cat > out.rs <<'EOF'

#![deny(broken_intra_doc_links)]
#![feature(no_core, lang_items)]
#![no_core]
#![crate_type = "rlib"]


// @has prim_methods_local/index.html
// @has - '//*[@id="main"]//a[@href="{{channel}}/std/primitive.char.html"]' 'char'
// @has - '//*[@id="main"]//a[@href="{{channel}}/std/primitive.char.html#method.len_utf8"]' 'char::len_utf8'

//! A [`char`] and its [`char::len_utf8`].

#[lang = "char"]
impl char {
    pub fn len_utf8(self) -> usize {
        42
    }
}

#[lang = "sized"]
pub trait Sized {}

#[lang = "clone"]
pub trait Clone: Sized {}

#[lang = "copy"]
pub trait Copy: Clone {}

EOF

rustdoc --edition=2021 out.rs
=== stdout ===
=== stderr ===
warning: lint `broken_intra_doc_links` has been renamed to `rustdoc::broken_intra_doc_links`
 --> out.rs:2:9
  |
2 | #![deny(broken_intra_doc_links)]
  |         ^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `rustdoc::broken_intra_doc_links`
  |
  = note: `#[warn(renamed_and_removed_lints)]` on by default

error[E0522]: definition of an unknown language item: `char`
  --> out.rs:14:1
   |
14 | #[lang = "char"]
   | ^^^^^^^^^^^^^^^^ definition of unknown language item `char`

error[E0390]: cannot define inherent `impl` for primitive types
  --> out.rs:15:6
   |
15 | impl char {
   |      ^^^^
   |
   = help: consider using an extension trait instead

error: unresolved link to `char::len_utf8`
  --> out.rs:12:26
   |
12 | //! A [`char`] and its [`char::len_utf8`].
   |                          ^^^^^^^^^^^^^^ the builtin type `char` has no associated item named `len_utf8`
   |
note: the lint level is defined here
  --> out.rs:2:9
   |
2  | #![deny(broken_intra_doc_links)]
   |         ^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 3 previous errors; 1 warning emitted

Some errors have detailed explanations: E0390, E0522.
For more information about an error, try `rustc --explain E0390`.
==============

=== stdout ===
=== stderr ===
warning: lint `broken_intra_doc_links` has been renamed to `rustdoc::broken_intra_doc_links`
 --> out.rs:2:9
  |
2 | #![deny(broken_intra_doc_links)]
  |         ^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `rustdoc::broken_intra_doc_links`
  |
  = note: `#[warn(renamed_and_removed_lints)]` on by default

error[E0522]: definition of an unknown language item: `char`
  --> out.rs:14:1
   |
14 | #[lang = "char"]
   | ^^^^^^^^^^^^^^^^ definition of unknown language item `char`

error[E0390]: cannot define inherent `impl` for primitive types
  --> out.rs:15:6
   |
15 | impl char {
   |      ^^^^
   |
   = help: consider using an extension trait instead

error: unresolved link to `char::len_utf8`
  --> out.rs:12:26
   |
12 | //! A [`char`] and its [`char::len_utf8`].
   |                          ^^^^^^^^^^^^^^ the builtin type `char` has no associated item named `len_utf8`
   |
note: the lint level is defined here
  --> out.rs:2:9
   |
2  | #![deny(broken_intra_doc_links)]
   |         ^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 3 previous errors; 1 warning emitted

Some errors have detailed explanations: E0390, E0522.
For more information about an error, try `rustc --explain E0390`.
==============
@Alexendoo Alexendoo merged commit 97fea65 into master Oct 18, 2022
@Alexendoo Alexendoo deleted the autofix/ices/96288.sh branch October 18, 2022 22:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants