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

Bad error message dereferencing something with a class type #2370

Closed
catamorphism opened this issue May 8, 2012 · 1 comment
Closed

Bad error message dereferencing something with a class type #2370

catamorphism opened this issue May 8, 2012 · 1 comment
Labels
A-type-system Area: Type system
Milestone

Comments

@catamorphism
Copy link
Contributor

class cat { new() {} }

fn main() {
  log (error, *(cat()));     // 1
  let nyan = cat();
  log (error, *nyan);       // 2
  let kitty : cat = cat();
  log (error, *kitty);        // 3
}

(1) yields the correct error message: "Type cat cannot be dereferenced". (2) and (3) yield less-than-helpful error messages of the form "Type <V1> cannot be dereferenced".

@ghost ghost assigned catamorphism May 8, 2012
@nikomatsakis
Copy link
Contributor

I happen to have fixed for this in the borrowck code, which I'll hopefully push soon... but basically we should be using fcx.to_str(ty) not ty_to_str(tcx, ty)

@catamorphism catamorphism removed their assignment Jun 16, 2014
bors added a commit to rust-lang-ci/rust that referenced this issue Sep 22, 2022
add another weak mem consistency test

`@cbeuw` your code seems to do this correctly? :D
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
This commit adds a CI job that runs the benchcomp tool on the
performance regression suite, comparing the HEAD of the pull request to
the branch that the PR targets.

The CI job fails if any performance benchmark regresses when run using
the HEAD version of Kani with respect to the 'base' branch. Regression
is defined as a regression in symex or solver time of 10% for any
benchmark for which this value is >2s, or if any performance benchmark
fails with the HEAD version while passing with the base.

This fixes rust-lang#2277.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-type-system Area: Type system
Projects
None yet
Development

No branches or pull requests

2 participants