Skip to content

xfailed three tests #4140

New issue

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

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

Already on GitHub? # to your account

Closed
catamorphism opened this issue Dec 8, 2012 · 3 comments
Closed

xfailed three tests #4140

catamorphism opened this issue Dec 8, 2012 · 3 comments
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc
Milestone

Comments

@catamorphism
Copy link
Contributor

Test in rust.md beginning with impl: ~str: Printable, src/test/run-pass/stat.rs, and src/test/bench/shootout/n-body.rs

It's too late at night to figure out what's wrong :-)

This was referenced Dec 14, 2012
@andrew-d
Copy link
Contributor

I took a stab at this issue. Submitted #4181 to fix the example in the docs, and can't reproduce either of the other two test failures. Not sure how to just run specific tests, so I just compiled each into executables and ran them:

$ ./x86_64-apple-darwin/stage2/bin/rustc -Z verbose -o /tmp/test1 ./src/test/bench/shootout-nbody.rs
warning: no debug symbols in executable (-arch x86_64)
$ ./x86_64-apple-darwin/stage2/bin/rustc -Z verbose -o /tmp/test2 ./src/test/run-pass/stat.rs
warning: no debug symbols in executable (-arch x86_64)
$ cd /tmp
$ ./test1
-0.169075
-0.169080
$ ./test2
$

Feel free to correct if necessary :)

@catamorphism
Copy link
Contributor Author

Thanks! For reference, you can run a specific test with:

make check TESTNAME=stat

(for example). There's lots more info at https://github.com/mozilla/rust/wiki/Note-testsuite

@catamorphism
Copy link
Contributor Author

Indeed, stat and n-body seems to have fixed themselves. I love it when that happens.

Thanks for the pull request, @andrew-d !

flip1995 pushed a commit to flip1995/rust that referenced this issue Feb 25, 2021
Rework use_self impl based on ty::Ty comparison rust-lang#3410 | Take 2

This builds on top of rust-lang#5531

I already reviewed and approved the commits by `@montrivo.` So only the review of my commits should be necessary.

I would also appreciate your review `@montrivo,` since you are familiar with the challenges here.

Fixes rust-lang#3410 and Fixes rust-lang#4143 (same problem)
Fixes rust-lang#2843
Fixes rust-lang#3859
Fixes rust-lang#4734 and fixes rust-lang#6221
Fixes rust-lang#4305
Fixes rust-lang#5078 (even at expression level now 🎉)
Fixes rust-lang#3881 and Fixes rust-lang#4887 (same problem)
Fixes rust-lang#3909

Not yet: rust-lang#4140 (test added)

All the credit for the fixes goes to `@montrivo.` I only refactored and copy and pasted his code.

changelog: rewrite [`use_self`] lint and fix multiple (8) FPs. One to go.
flip1995 pushed a commit to flip1995/rust that referenced this issue Jun 17, 2021
Fix use_self FPs on type params

changelog: Fix [`use_self`] false positives on type parameters

Fixes rust-lang#4140
Fixes rust-lang#7139
flip1995 pushed a commit to flip1995/rust that referenced this issue Nov 21, 2022
Previously the following wrong suggestion was given

```rust
impl Error for std::fmt::Error {
    fn custom<T: std::fmt::Display>(_msg: T) -> Self {
-        std::fmt::Error // Should lint
+        Self::Error // Should lint
    }
}
```

Also remove known problem line related to rust-lang#4140 since it's been closed, and refactor the lint
flip1995 pushed a commit to flip1995/rust that referenced this issue Nov 21, 2022
[`use_self`] fix suggestion when full path to struct was given

Previously the following wrong suggestion was given

```rust
impl Error for std::fmt::Error {
    fn custom<T: std::fmt::Display>(_msg: T) -> Self {
-        std::fmt::Error // Should lint
+        Self::Error // Should lint
    }
}
```

Also remove known problem line related to rust-lang#4140 since it's been closed, and refactor the lint

changelog: [`use_self`] fix suggestion when full path to struct was given
RalfJung added a commit to RalfJung/rust that referenced this issue Feb 2, 2025
Use deref_pointer_as instead of deref_pointer
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc
Projects
None yet
Development

No branches or pull requests

2 participants