Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upStable regression in tcod-0.8.0 resolving AsRef<Path> #30744
Comments
This comment has been minimized.
This comment has been minimized.
|
You can get the source with |
brson
added
regression-from-stable-to-stable
and removed
regression-from-stable-to-beta
labels
Jan 6, 2016
brson
changed the title
Regression in tcod-0.8.0 resolving AsRef<Path>
Stable regression in tcod-0.8.0 resolving AsRef<Path>
Jan 6, 2016
This comment has been minimized.
This comment has been minimized.
|
I've updated the OP to indicate that this is actually a regression from 1.4->1.5 stable. |
This comment has been minimized.
This comment has been minimized.
|
likely related to adding an |
This comment has been minimized.
This comment has been minimized.
|
Note that I don't think this is related to new |
This comment has been minimized.
This comment has been minimized.
|
We can try to bisect. |
brson
self-assigned this
Jan 6, 2016
This comment has been minimized.
This comment has been minimized.
|
@brson OK -- FWIW, the current behavior looks buggy, so we can can also just try to reduce the test and make a fix directly. |
This comment has been minimized.
This comment has been minimized.
|
Probably a good starting point would be trying to create a minimized test case. |
This comment has been minimized.
This comment has been minimized.
|
Would this be a minimized test case? use std::path::Path;
struct Root<'a> {
font_path: Box<AsRef<Path> + 'a>
}
fn main() {
let path = Path::new("/");
let root = Root {
font_path: Box::new(&path)
};
let path_ref : &Path = root.font_path.as_ref();
}I get the following with
|
This comment has been minimized.
This comment has been minimized.
|
triage: P-high someone should indeed try to figure out what the problem is; whether the test case in the previous comment is a representative (i.e. try it against Rust 1.4 or so), et cetera. |
rust-highfive
added
P-high
and removed
I-nominated
labels
Jan 7, 2016
This comment has been minimized.
This comment has been minimized.
|
I was able to confirm that the code fails to compile on On January 7, 2016 7:07:41 PM GMT-02:00, Felix S Klock II notifications@github.com wrote:
Sent from my Android device with K-9 Mail. Please excuse my brevity. |
This comment has been minimized.
This comment has been minimized.
|
@bltavares Thanks for the investigation! |
This comment has been minimized.
This comment has been minimized.
|
I'm going to look into this. |
arielb1
added
the
T-libs
label
Jan 8, 2016
This comment has been minimized.
This comment has been minimized.
|
I am quite sure this impl is guilty: #[stable(since = "1.5.0", feature = "smart_ptr_as_ref")]
impl<T: ?Sized> AsRef<T> for Box<T> {
fn as_ref(&self) -> &T {
&**self
}
} |
This comment has been minimized.
This comment has been minimized.
|
I am quite sure we have seen this issue before - and our consensus is that methods like |
This comment has been minimized.
This comment has been minimized.
|
@arielb1 Good catch; I'm sure you're correct, and I agree with the analysis. Thanks! |
This comment has been minimized.
This comment has been minimized.
|
Thanks everyone for investigating. |
brson commentedJan 6, 2016
Originally reported by crater.
tcod-0.8.0 builds on 1.4 but not 1.5. The errors (two of them) are: