Skip to content

Conversation

brson
Copy link
Contributor

@brson brson commented Dec 11, 2012

r? @pcwalton

The error messages when failing to use ~str are bad:

<core-macros>:17:37: 17:43 error: mismatched types: expected `~str` but found `&static/str` (str storage differs: expected ~ but found &static)
<core-macros>:17                 let msgptr: &~str = &{$msg};
                                                      ^~~~~~
<core-macros>:13:4: 1:0 note: in expansion of die!
/home/brian/dev/rust/src/test/compile-fail/die-not-unique.rs:4:4: 4:17 note: expansion site
<core-macros>:17:36: 17:43 error: mismatched types: expected `&~str` but found `&&static/str` (str storage differs: expected ~ but found &static)
<core-macros>:17                 let msgptr: &~str = &{$msg};
                                                     ^~~~~~~
<core-macros>:13:4: 1:0 note: in expansion of die!
/home/brian/dev/rust/src/test/compile-fail/die-not-unique.rs:4:4: 4:17 note: expansion site
error: aborting due to 2 previous errors

@brson
Copy link
Contributor Author

brson commented Dec 11, 2012

I wonder if this still works in expr position... yes, it does.

@pcwalton
Copy link
Contributor

r- per IRC.

@brson brson closed this Dec 11, 2012
RalfJung added a commit to RalfJung/rust that referenced this pull request Jan 26, 2025
…lookups

Pre-intern name when searching module children
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.

2 participants