Skip to content

Conversation

@codeblack08
Copy link
Contributor

This is for issue #4710.

@codeblack08
Copy link
Contributor Author

This just removes the declarations. I'm not exactly sure on the process to fix the tests.

@pcwalton
Copy link
Contributor

pcwalton commented Feb 2, 2013

Do the tests still pass?

@codeblack08
Copy link
Contributor Author

No. Multiple tests fail.

A simple example is run-pass/expr-copy. Without legacy_modes, the first call to f moves x and then the second call will fail with "error: use of moved value: x" The premise for the test no longer really holds true. Perhaps a faithful recreation could be:

fn f(arg: A) {
    arg.a = 100;
}

fn g(arg: &mut A) {
    arg.a = 100;
}

struct A { mut a: int }

pub fn main() {
    let mut x = A {a: 10};
    g(&mut x);
    assert x.a == 100;
    x.a = 20;
    f(copy x);
    assert x.a == 20;
}

So, fixing some of the tests require these kinds of semantic changes. I'll take a crack at trying to fix them, if you want, though.

@catamorphism
Copy link
Contributor

@codeblack08 Please try to make the tests pass (ask on IRC or here if you need help) and re-submit after that. bors won't merge any commits that cause tests to fail anyway :-)

Closing this for now, please do start another pull request if you have a chance to fix the tests.

RalfJung added a commit to RalfJung/rust that referenced this pull request Dec 6, 2025
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.

3 participants