Skip to content

librustc: Remove outdated reference to ~ syntax #15071

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

Merged
merged 1 commit into from
Jun 24, 2014

Conversation

tomjakubowski
Copy link
Contributor

Fix #15052

@tomjakubowski
Copy link
Contributor Author

The error message now looks like:

foo.rs:11:5: 11:6 error: cannot borrow immutable dereference of `Box`-pointer `*a` as mutable
foo.rs:11     a.foo();
              ^

Is it better to use box than Box? Wasn't sure if the ~ and @ sigils referred to the operators or to the type constructors.

@steveklabnik
Copy link
Member

You should use Box. I would just say Box and not Box-pointer, personally.

@schmee
Copy link
Contributor

schmee commented Jun 21, 2014

Should GcPtr be changed to Gc as well?

@tomjakubowski
Copy link
Contributor Author

@schmee @steveklabnik updated with your feedback, thanks!

@@ -1121,7 +1121,10 @@ impl<'t,TYPER:Typer> MemCategorizationContext<'t,TYPER> {
"captured outer variable".to_string()
}
_ => {
format!("dereference of `{}`-pointer", ptr_sigil(pk))
match pk {
OwnedPtr => format!("dereference of `{}`", ptr_sigil(pk)),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this match also single out a GcPtr? Also, can you add tests for both these cases?

@tomjakubowski
Copy link
Contributor Author

Pushed again with tests + a new message for Gc.

@bors bors closed this Jun 24, 2014
@bors bors merged commit 0af4985 into rust-lang:master Jun 24, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 17, 2023
internal: remove spurious regex dependency

- replace tokio's env-filter with a smaller&simpler targets filter
- reshuffle logging infra a bit to make sure there's only a single place where we read environmental variables
- use anyhow::Result in rust-analyzer binary
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.

rustc error references the old '~' syntax for boxes
5 participants