Skip to content

Commit 2a56a37

Browse files
authored
make using A.B only for modules, using A: B only for single bindings (#25306)
part of #8000
1 parent bbc7b83 commit 2a56a37

File tree

24 files changed

+44
-26
lines changed

24 files changed

+44
-26
lines changed

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ Language changes
173173
by a character that will never be an allowed identifier character (currently
174174
operators, space/control characters, or common punctuation characters) ([#25231]).
175175

176+
* The syntax `using A.B` can now only be used when `A.B` is a module, and the syntax
177+
`using A: B` can only be used for adding single bindings ([#8000]).
178+
176179

177180
Breaking changes
178181
----------------

base/asyncmap.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is a part of Julia. License is MIT: https://julialang.org/license
22

3-
using Base.Iterators.Enumerate
3+
using Base.Iterators: Enumerate
44

55
"""
66
asyncmap(f, c...; ntasks=0, batch_size=nothing)

base/libgit2/libgit2.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module LibGit2
77

88
import Base: ==
99
using Base: coalesce, notnothing
10-
using Base.Printf.@printf
10+
using Base.Printf: @printf
1111

1212
export with, GitRepo, GitConfig
1313

base/math.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ using Base: sign_mask, exponent_mask, exponent_one,
2525

2626
using Core.Intrinsics: sqrt_llvm
2727

28-
using Base.IEEEFloat
28+
using Base: IEEEFloat
2929

3030
@noinline function throw_complex_domainerror(f, x)
3131
throw(DomainError(x, string("$f will only return a complex result if called with a ",

base/pkg/entry.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import ..Reqs, ..Read, ..Query, ..Resolve, ..Cache, ..Write, ..Dir
77
using ...LibGit2
88
import ...Pkg.PkgError
99
using ..Types
10-
using Base.Printf.@printf
10+
using Base.Printf: @printf
1111

1212
macro recover(ex)
1313
quote

base/printf.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# This file is a part of Julia. License is MIT: https://julialang.org/license
22

33
module Printf
4-
using Base: Grisu, GMP
4+
using Base.Grisu
5+
using Base.GMP
56
using Base.Unicode: lowercase, textwidth, isupper
67

78
### printf formatter generation ###

base/random/dSFMT.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module dSFMT
44

55
import Base: copy, copy!, ==, hash
6-
using Base.GMP: MPZ
6+
using Base.GMP.MPZ
77

88
export DSFMT_state, dsfmt_get_min_array_size, dsfmt_get_idstring,
99
dsfmt_init_gen_rand, dsfmt_init_by_array, dsfmt_gv_init_by_array,

base/random/random.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
module Random
44

55
using Base.dSFMT
6-
using Base.GMP: Limb, MPZ
6+
using Base.GMP.MPZ
7+
using Base.GMP: Limb
78
using Base: BitInteger, BitInteger_types, BitUnsigned, @gc_preserve
89

910
import Base: copymutable, copy, copy!, ==, hash

base/sort.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
module Sort
44

5-
using Base: Order, Checked, copymutable, linearindices, IndexStyle, viewindexing, IndexLinear, _length
5+
using Base.Order, Base.Checked
6+
using Base: copymutable, linearindices, IndexStyle, viewindexing, IndexLinear, _length
67

78
import
89
Base.sort,

base/stacktraces.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module StackTraces
88

99
import Base: hash, ==, show
1010
import Base.Serializer: serialize, deserialize
11-
using Base.Printf.@printf
11+
using Base.Printf: @printf
1212

1313
export StackTrace, StackFrame, stacktrace, catch_stacktrace
1414

0 commit comments

Comments
 (0)