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

Remove newtype struct auto-dereferencing method resolution #6246

Closed
brson opened this issue May 5, 2013 · 3 comments
Closed

Remove newtype struct auto-dereferencing method resolution #6246

brson opened this issue May 5, 2013 · 3 comments
Labels
A-typesystem Area: The type system
Milestone

Comments

@brson
Copy link
Contributor

brson commented May 5, 2013

This topic is sort of buried in #3534. Consider removing the auto-deref behavior on newtype structs. Specifically, auto-dereferencing method resolution. I have seen unexpected method checking errors because of it on multiple occasions, but have not seen it used effectively.

The use case I know for this feature is smart pointers, but as a solution for smart pointer dereferencing it is not useful because it allows for no additional state besides the contained value.

Simplifying method resolution is good.

@brson
Copy link
Contributor Author

brson commented Oct 15, 2013

I still do not like this at all. Nominating.

@catamorphism
Copy link
Contributor

1.0, backwards-compatible

brson added a commit to brson/rust that referenced this issue Nov 7, 2013
I'm not sure if this was even intentional at this point.
brson added a commit to brson/rust that referenced this issue Jan 4, 2014
I'm not sure if this was even intentional at this point.
brson added a commit to brson/rust that referenced this issue Jan 4, 2014
@brson
Copy link
Contributor Author

brson commented Jan 5, 2014

Removed.

@brson brson closed this as completed Jan 5, 2014
@ghost ghost mentioned this issue Jan 5, 2014
lnicola pushed a commit to lnicola/rust that referenced this issue Apr 20, 2024
As of rust-lang#6246, rust-analyzer follows symlinks. This can introduce an
infinite loop if symlinks point to parent directories.

Considering that rust-lang#6246 was added in 2020 without many bug reports,
this is clearly a rare occurrence. However, I am observing
rust-analyzer hang on projects that have symlinks of the form:

```
test/a_symlink -> ../../
```

Ignore symlinks that only point to the parent directories, as this is
more robust but still allows typical symlink usage patterns.
lnicola pushed a commit to lnicola/rust that referenced this issue Apr 20, 2024
…Veykril

fix: VFS should not walk circular symlinks

As of rust-lang#6246, rust-analyzer follows symlinks. This can introduce an infinite loop if symlinks point to parent directories.

Considering that rust-lang#6246 was added in 2020 without many bug reports, this is clearly a rare occurrence. However, I am observing rust-analyzer hang on projects that have symlinks of the form:

```
test/a_symlink -> ../../
```

Ignore symlinks that only point to the parent directories, as this is more robust but still allows typical symlink usage patterns.
lnicola pushed a commit to lnicola/rust that referenced this issue Apr 20, 2024
As of rust-lang#6246, rust-analyzer follows symlinks. This can introduce an
infinite loop if symlinks point to parent directories.

Considering that rust-lang#6246 was added in 2020 without many bug reports,
this is clearly a rare occurrence. However, I am observing
rust-analyzer hang on projects that have symlinks of the form:

```
test/a_symlink -> ../../
```

Ignore symlinks that only point to the parent directories, as this is
more robust but still allows typical symlink usage patterns.
lnicola pushed a commit to lnicola/rust that referenced this issue Apr 20, 2024
…Veykril

fix: VFS should not walk circular symlinks

As of rust-lang#6246, rust-analyzer follows symlinks. This can introduce an infinite loop if symlinks point to parent directories.

Considering that rust-lang#6246 was added in 2020 without many bug reports, this is clearly a rare occurrence. However, I am observing rust-analyzer hang on projects that have symlinks of the form:

```
test/a_symlink -> ../../
```

Ignore symlinks that only point to the parent directories, as this is more robust but still allows typical symlink usage patterns.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-typesystem Area: The type system
Projects
None yet
Development

No branches or pull requests

2 participants