Skip to content

Clarify that relative paths with super start in the parent module - #4835

Open
SatvikMishra08 wants to merge 1 commit into
rust-lang:mainfrom
SatvikMishra08:fix/4832-ch7-super-wording
Open

SatvikMishra08 wants to merge 1 commit into
rust-lang:mainfrom
SatvikMishra08:fix/4832-ch7-super-wording

Conversation

@SatvikMishra08

Copy link
Copy Markdown

Summary

The Chapter 7.3 intro currently says a relative path "starts from the current module and uses self, super, or an identifier in the current module," which reads as if super also starts from the current module. In reality super starts in the parent module (as the later "Starting Relative Paths with super" section already explains).

This updates the intro bullet so relative paths are described as starting with self, super, or an identifier, and then distinguishes where each kind begins: current module for self / an identifier, parent module for super.

Fixes #4832

Note

Open PR #4831 also edits this chapter but does not touch this intro sentence (it reworks the post-listing absolute vs relative discussion). These changes should compose cleanly.

The intro to Chapter 7.3 said a relative path "starts from the current
module and uses self, super, or an identifier", which incorrectly implies
that `super` also starts from the current module. Distinguish `self` /
identifier (current module) from `super` (parent module).

Fixes rust-lang#4832
@oli-obk

oli-obk commented Sep 27, 2026 •

Copy link
Copy Markdown

The account under which this PR was opened has been banned from the rust-lang org for spamming

This branch has not been deployed

No deployments
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.

Chapter 7.3: intro says that super starts with the current module

2 participants