Skip to content

Commit

Permalink
Fix ambiguous precedences in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Urgau committed Oct 25, 2023
1 parent 0a3188b commit 75af01b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/rustdoc/const-generics/const-generics-docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pub async fn b_sink<const N: usize>(_: impl Trait<N>) {}

// @has foo/fn.concrete.html '//pre[@class="rust item-decl"]' \
// 'pub fn concrete() -> [u8; 22]'
pub fn concrete() -> [u8; 3 + std::mem::size_of::<u64>() << 1] {
pub fn concrete() -> [u8; (3 + std::mem::size_of::<u64>()) << 1] {
Default::default()
}

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/consts/const-err-rpass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const W: bool = Z <= 'B';


fn main() {
let _ = ((-1 as i8) << 8 - 1) as f32;
let _ = ((-1 as i8) << (8 - 1)) as f32;
let _ = 0u8 as char;
let _ = true > false;
let _ = true >= false;
Expand Down

0 comments on commit 75af01b

Please sign in to comment.