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

The ~ and @ sigils still appear in error messages #14915

Closed
japaric opened this issue Jun 15, 2014 · 1 comment
Closed

The ~ and @ sigils still appear in error messages #14915

japaric opened this issue Jun 15, 2014 · 1 comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-typesystem Area: The type system E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@japaric
Copy link
Member

japaric commented Jun 15, 2014

Script to reproduce:

use std::gc::{GC,Gc};

fn main() {
    let x: Box<int> = box 0;
    let y: Gc<int> = box (GC) 0;

    println!("{}", x + 1);
    println!("{}", y + 1);
}

Output:

foo.rs:7:20: 7:25 error: binary operation `+` cannot be applied to type `~int`
foo.rs:7     println!("{}", x + 1);
                            ^~~~~
note: in expansion of format_args!
<std macros>:2:23: 2:77 note: expansion site
<std macros>:1:1: 3:2 note: in expansion of println!
foo.rs:7:5: 7:27 note: expansion site
foo.rs:8:20: 8:25 error: binary operation `+` cannot be applied to type `@int`
foo.rs:8     println!("{}", y + 1);
                            ^~~~~
note: in expansion of format_args!
<std macros>:2:23: 2:77 note: expansion site
<std macros>:1:1: 3:2 note: in expansion of println!
foo.rs:8:5: 8:27 note: expansion site
foo.rs:7:20: 7:25 error: cannot determine a type for this bounded type parameter: unconstrained type
foo.rs:7     println!("{}", x + 1);
                            ^~~~~
note: in expansion of format_args!
<std macros>:2:23: 2:77 note: expansion site
<std macros>:1:1: 3:2 note: in expansion of println!
foo.rs:7:5: 7:27 note: expansion site

Expected:
Box<int> instead of ~int
Gc<int> instead of @int

Version:

$ rustc --version
rustc 0.11.0-pre (6d8342f 2014-06-14 17:51:49 +0000)
host: x86_64-unknown-linux-gnu

Filed as per @pcwalton request

schmee added a commit to schmee/rust that referenced this issue Jun 16, 2014
@brson
Copy link
Contributor

brson commented Jun 16, 2014

Nominating.

alexcrichton added a commit to alexcrichton/rust that referenced this issue Jun 17, 2014
Closes rust-lang#14888 (Allow disabling jemalloc as the memory allocator)
Closes rust-lang#14905 (rustc: Improve span for error about using a method as a field.)
Closes rust-lang#14920 (Fix rust-lang#14915)
Closes rust-lang#14924 (Add a Syntastic plugin for Rust.)
Closes rust-lang#14935 (debuginfo: Correctly handle indirectly recursive types)
Closes rust-lang#14938 (Reexport `num_cpus` in `std::os`. Closes rust-lang#14707)
Closes rust-lang#14941 (std: Don't fail the task when a Future is dropped)
Closes rust-lang#14942 (rustc: Don't mark type parameters as exported)
Closes rust-lang#14943 (doc: Fix a link in the FAQ)
Closes rust-lang#14944 (Update "use" to "uses" on ln186)
Closes rust-lang#14949 (Update repo location)
Closes rust-lang#14950 (fix typo in the libc crate)
Closes rust-lang#14951 (Update Sublime Rust github link)
Closes rust-lang#14953 (Fix --disable-rpath and tests)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-typesystem Area: The type system E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

3 participants