Skip to content

Check lifetime parameters when resolving impls; use ty::substs in trans #14055

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

Conversation

nikomatsakis
Copy link
Contributor

Code to use ty::substs in trans. As part of this, uncovered (and fixed) issue #14050.

r? @pcwalton

@nikomatsakis
Copy link
Contributor Author

Note: bootstraps, but not fully tested, so let's see what travis yields. ;)

@sfackler
Copy link
Member

sfackler commented May 9, 2014

Travis doesn't like your line lengths: /home/travis/build/mozilla/rust/src/librustc/middle/trans/intrinsic.rs:468: line longer than 100 chars

… a proper

ty::substs struct. This is a holdover from the olden days of yore. This patch
removes the last vestiges of that practice. This is part of the work
I was doing on rust-lang#5527.
@nikomatsakis
Copy link
Contributor Author

Rebased, fixed line lengths.

@nikomatsakis
Copy link
Contributor Author

Travis looks happy.

bors added a commit that referenced this pull request May 9, 2014
…ns, r=pcwalton

Code to use `ty::substs` in trans. As part of this, uncovered (and fixed) issue #14050.

r? @pcwalton
@bors bors closed this May 9, 2014
@nikomatsakis nikomatsakis deleted the issue-5527-use-substs-in-trans branch March 30, 2016 16:15
bors pushed a commit to rust-lang-ci/rust that referenced this pull request Jan 28, 2025
changelog: none

`x & 15 == 0` is not equivalent to `x.trailing_zeros() > 4`, as `x =
0b10000` is true for the former and false for the latter.

In fact, clippy itself suggests the following:

```rust
pub fn src(x: i32) -> bool {
    x & 15 == 0 // ~error: bit mask could be simplified with a call to `trailing_zeros`
    ^^^^^^^^^^^ help: try: `x.trailing_zeros() >= 4`
}
```
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

Successfully merging this pull request may close these issues.

4 participants