# Pre-RFC: Stable rustdoc URLs

**URL:** https://internals.rust-lang.org/t/pre-rfc-stable-rustdoc-urls/13099
**Category:** language design
**Created:** [September 18, 2020, 10:32pm UTC](https://internals.rust-lang.org/t/pre-rfc-stable-rustdoc-urls/13099 "2020-09-18T22:32:24Z")
**Posts on this page:** 1
**Showing post:** 31

<div class="post-metadata">

### Author: ![elidupree](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/elidupree/32/4304_2.png) [@elidupree](https://internals.rust-lang.org/u/elidupree)
#### Post date: [September 20, 2020, 2:28pm UTC](https://internals.rust-lang.org/t/pre-rfc-stable-rustdoc-urls/13099/31 "2020-09-20T14:28:03Z")

</div>

Ooooh, that is _nasty_. Even with all private fields, this code compiles:

```rust
mod foo {
    pub struct Foo {
        field: i32,
    }
}
use foo::Foo;

fn fooer(foo: foo::Foo) {
    let Foo { .. } = foo;
}

```

and thus Foo can't be changed into an enum without breaking compilation. (It _can_ be changed into a tuple-like struct, though, oddly enough?) I haven't thought of an example that prevents union-\>struct or union-\>enum though. And even enum-\>struct might be possible if the enum's variants were all `#[doc(hidden)]`.

Regardless, at the very least, it's clearly compatible to switch an item from any concrete type into a `pub use` or a type alias to that type. So we definitely need this RFC for _something_, and it doesn't seem especially valuable to try to _preserve_ the URL naming distinction between `struct`, `enum`, and `union`.

---

_[View the full topic](https://internals.rust-lang.org/t/pre-rfc-stable-rustdoc-urls/13099)._
