Fix ICE in missing_panics_doc
This commit is contained in:
parent
a15d987c8f
commit
a00de90ceb
2 changed files with 23 additions and 3 deletions
|
|
@ -1,8 +1,8 @@
|
|||
//! This file tests for the `DOC_MARKDOWN` lint.
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![allow(dead_code, incomplete_features)]
|
||||
#![warn(clippy::doc_markdown)]
|
||||
#![feature(custom_inner_attributes)]
|
||||
#![feature(custom_inner_attributes, const_generics, const_evaluatable_checked, const_option)]
|
||||
#![rustfmt::skip]
|
||||
|
||||
/// The foo_bar function does _nothing_. See also foo::bar. (note the dot there)
|
||||
|
|
@ -202,3 +202,20 @@ fn issue_2343() {}
|
|||
/// This should not cause an ICE:
|
||||
/// __|_ _|__||_|
|
||||
fn pulldown_cmark_crash() {}
|
||||
|
||||
// issue #7033 - const_evaluatable_checked ICE
|
||||
struct S<T, const N: usize>
|
||||
where [(); N.checked_next_power_of_two().unwrap()]: {
|
||||
arr: [T; N.checked_next_power_of_two().unwrap()],
|
||||
n: usize,
|
||||
}
|
||||
|
||||
impl<T: Copy + Default, const N: usize> S<T, N>
|
||||
where [(); N.checked_next_power_of_two().unwrap()]: {
|
||||
fn new() -> Self {
|
||||
Self {
|
||||
arr: [T::default(); N.checked_next_power_of_two().unwrap()],
|
||||
n: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue