Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary operator "as" has weaker precedence than binary operator "<" #13081

Closed
adamkalis opened this issue Mar 22, 2014 · 1 comment
Closed

Binary operator "as" has weaker precedence than binary operator "<" #13081

adamkalis opened this issue Mar 22, 2014 · 1 comment

Comments

@adamkalis
Copy link

A simple example

enum Direction {
  North,
  East,
  South,
  West
}

fn main (){
  println!("{}", North as int < 2)
//Compiles fine with >, >=, <=, == and !=
//but with < I get
//test.rs:9:31: 9:32 error: expected type, found token LIT_INT_UNSUFFIXED(2i64)
//test.rs:9 println!("{}", North as int < 2)
//                                        ^             
} 

If I use parenthesis

println!("{}", (North as int) < 2)

It compiles.

This is related with issue #11962

@adamkalis
Copy link
Author

I close this issue as a dupe of #11962

matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this issue Sep 13, 2022
…, r=lnicola

Build release artifact against older Glibc

When GitHub [deprecated Ubuntu 18.04](https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/) runners, rust-analyzer was forced to bump runners to 20.04 which includes an updated Glib. This renders RA incompatible with the still popular Ubuntu 18.04 and other slightly older distro versions.

Until a deprecation plan is announced on RA's side, I propose binaries shall be built against older glibc to maintain compatibility.

This PR changes the Release CI workflow to build the `linux-x64/x86_64-unknown-linux-gnu` release in an Ubuntu 18.04 container.

Fixes rust-lang#13081 and rust-lang#13085
flip1995 pushed a commit to flip1995/rust that referenced this issue Jul 11, 2024
… r=y21

Fix `iter_next_loop.rs` ui test

I'm uncovering bugs while working on rust-lang/rust-clippy#11421. ^^'

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant