-
# Updated example
``` rust
trait Trait {
fn outer(self) {
fn inner(_: Self) {
}
}
}
fn main() { }
```
```
error: missing `Self` type param in the substitution of `fn(Self)`
…
-
Trying to do some f64 calculation when rustc returns a bug.
The reason is that i am using `/2` instead of `/2.0`
I tried this code:
```
fn main() {
// golden ratio
let phi = ((5.0 as f64).sq…
-
Here's the backtrace. Let me know if the code I was compiling would be helpful, I tagged the rev locally.
`rustc 1.1.0-nightly (7bd71637c 2015-05-06) (built 2015-05-06)`
```
$ RUST_BACKTRACE=1 cargo…
-
ICE when accessing a non-existent enum variant through a reference.
Test case 1 (`Bar` is a struct, not even an enum):
``` rust
fn foo(t: &T) {}
struct Bar;
fn main() {
foo(&Bar::Baz);
}
```
…
-
# Rust version:
```
rustc 1.0.0-nightly (3ef8ff1f8 2015-02-12 00:38:24 +0000)
binary: rustc
commit-hash: 3ef8ff1f81107b42840a695725e1a0869c163355
commit-date: 2015-02-12 00:38:24 +0000
host: x86_64-a…
-
Replication:
```
#!/bin/bash
cat > ice.rs f32 {
if t < 0.5 {
4.0 * t * t * t
} else {
let u = 2.0 * t - 2.0;
0.5 * u * u * u + 1 // ::select_where_possible::h0b137ff…
-
``` rust
enum X { }
enum Y { A = X::A }
fn main() { }
```
```
test5.rs:3:14: 3:18 error: type `X` does not implement any method in scope named `A`
test5.rs:3 enum Y { A = X::A }
…
-
```
[ruben@MacBook-Pro src]$ rustc --version=verbose
rustc 0.13.0-nightly (40fb87d40 2014-11-10 23:01:57 +0000)
binary: rustc
commit-hash: 40fb87d40f681f5356af42175fc7b85da387f037
commit-date: 2014-11…
-
I tried this code:
``` rust
use std::f64::consts::PI;
fn main() {
let n = 1.5;
if PI/3. < n && n < PI/2 {
println!("PI/3
-
I came across this failure while trying to implement double dispatch. Here's the reduced code to reproduce it:
```
pub trait MatBase {
// Base method for double dispatch.
// Performs: MatBas…